1[ 2 { 3 "id": "901f", 4 "name": "Add fw filter with prio at 32-bit maxixum", 5 "category": [ 6 "filter", 7 "fw" 8 ], 9 "plugins": { 10 "requires": "nsPlugin" 11 }, 12 "setup": [ 13 "$TC qdisc add dev $DEV1 ingress" 14 ], 15 "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 prio 65535 fw action ok", 16 "expExitCode": "0", 17 "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 65535 protocol all fw", 18 "matchPattern": "pref 65535 fw.*handle 0x1.*gact action pass", 19 "matchCount": "1", 20 "teardown": [ 21 "$TC qdisc del dev $DEV1 ingress" 22 ] 23 }, 24 { 25 "id": "51e2", 26 "name": "Add fw filter with prio exceeding 32-bit maxixum", 27 "category": [ 28 "filter", 29 "fw" 30 ], 31 "plugins": { 32 "requires": "nsPlugin" 33 }, 34 "setup": [ 35 "$TC qdisc add dev $DEV1 ingress" 36 ], 37 "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 prio 65536 fw action ok", 38 "expExitCode": "255", 39 "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 65536 protocol all fw", 40 "matchPattern": "pref 65536 fw.*handle 0x1.*gact action pass", 41 "matchCount": "0", 42 "teardown": [ 43 "$TC qdisc del dev $DEV1 ingress" 44 ] 45 }, 46 { 47 "id": "d987", 48 "name": "Add fw filter with action ok", 49 "category": [ 50 "filter", 51 "fw" 52 ], 53 "plugins": { 54 "requires": "nsPlugin" 55 }, 56 "setup": [ 57 "$TC qdisc add dev $DEV1 ingress" 58 ], 59 "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 prio 1 fw action ok", 60 "expExitCode": "0", 61 "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol all fw", 62 "matchPattern": "handle 0x1.*gact action pass", 63 "matchCount": "1", 64 "teardown": [ 65 "$TC qdisc del dev $DEV1 ingress" 66 ] 67 }, 68 { 69 "id": "c591", 70 "name": "Add fw filter with action ok by reference", 71 "category": [ 72 "filter", 73 "fw" 74 ], 75 "plugins": { 76 "requires": "nsPlugin" 77 }, 78 "setup": [ 79 "$TC qdisc add dev $DEV1 ingress", 80 "$TC actions add action gact ok index 1" 81 ], 82 "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 prio 1 fw action gact index 1", 83 "expExitCode": "0", 84 "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol all fw", 85 "matchPattern": "handle 0x1.*gact action pass.*index 1 ref 2 bind 1", 86 "matchCount": "1", 87 "teardown": [ 88 "$TC qdisc del dev $DEV1 ingress" 89 ] 90 }, 91 { 92 "id": "affe", 93 "name": "Add fw filter with action continue", 94 "category": [ 95 "filter", 96 "fw" 97 ], 98 "plugins": { 99 "requires": "nsPlugin" 100 }, 101 "setup": [ 102 "$TC qdisc add dev $DEV1 ingress" 103 ], 104 "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 prio 1 fw action continue", 105 "expExitCode": "0", 106 "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol all fw", 107 "matchPattern": "handle 0x1.*gact action continue", 108 "matchCount": "1", 109 "teardown": [ 110 "$TC qdisc del dev $DEV1 ingress" 111 ] 112 }, 113 { 114 "id": "38b3", 115 "name": "Add fw filter with action continue by reference", 116 "category": [ 117 "filter", 118 "fw" 119 ], 120 "plugins": { 121 "requires": "nsPlugin" 122 }, 123 "setup": [ 124 "$TC qdisc add dev $DEV1 ingress", 125 "$TC actions add action gact continue index 1" 126 ], 127 "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 prio 1 fw action gact index 1", 128 "expExitCode": "0", 129 "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol all fw", 130 "matchPattern": "handle 0x1.*gact action continue.*index 1 ref 2 bind 1", 131 "matchCount": "1", 132 "teardown": [ 133 "$TC qdisc del dev $DEV1 ingress" 134 ] 135 }, 136 { 137 "id": "28bc", 138 "name": "Add fw filter with action pipe", 139 "category": [ 140 "filter", 141 "fw" 142 ], 143 "plugins": { 144 "requires": "nsPlugin" 145 }, 146 "setup": [ 147 "$TC qdisc add dev $DEV1 ingress" 148 ], 149 "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 prio 1 fw action pipe", 150 "expExitCode": "0", 151 "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol all fw", 152 "matchPattern": "handle 0x1.*gact action pipe", 153 "matchCount": "1", 154 "teardown": [ 155 "$TC qdisc del dev $DEV1 ingress" 156 ] 157 }, 158 { 159 "id": "6753", 160 "name": "Add fw filter with action pipe by reference", 161 "category": [ 162 "filter", 163 "fw" 164 ], 165 "plugins": { 166 "requires": "nsPlugin" 167 }, 168 "setup": [ 169 "$TC qdisc add dev $DEV1 ingress", 170 "$TC actions add action gact pipe index 1" 171 ], 172 "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 prio 1 fw action gact index 1", 173 "expExitCode": "0", 174 "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol all fw", 175 "matchPattern": "handle 0x1.*gact action pipe.*index 1 ref 2 bind 1", 176 "matchCount": "1", 177 "teardown": [ 178 "$TC qdisc del dev $DEV1 ingress" 179 ] 180 }, 181 { 182 "id": "8da2", 183 "name": "Add fw filter with action drop", 184 "category": [ 185 "filter", 186 "fw" 187 ], 188 "plugins": { 189 "requires": "nsPlugin" 190 }, 191 "setup": [ 192 "$TC qdisc add dev $DEV1 ingress" 193 ], 194 "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 prio 1 fw action drop", 195 "expExitCode": "0", 196 "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 protocol all prio 1 fw", 197 "matchPattern": "handle 0x1.*gact action drop", 198 "matchCount": "1", 199 "teardown": [ 200 "$TC qdisc del dev $DEV1 ingress" 201 ] 202 }, 203 { 204 "id": "6dc6", 205 "name": "Add fw filter with action drop by reference", 206 "category": [ 207 "filter", 208 "fw" 209 ], 210 "plugins": { 211 "requires": "nsPlugin" 212 }, 213 "setup": [ 214 "$TC qdisc add dev $DEV1 ingress", 215 "$TC actions add action gact drop index 1" 216 ], 217 "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 prio 1 fw action gact index 1", 218 "expExitCode": "0", 219 "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol all fw", 220 "matchPattern": "handle 0x1.*gact action drop.*index 1 ref 2 bind 1", 221 "matchCount": "1", 222 "teardown": [ 223 "$TC qdisc del dev $DEV1 ingress" 224 ] 225 }, 226 { 227 "id": "9436", 228 "name": "Add fw filter with action reclassify", 229 "category": [ 230 "filter", 231 "fw" 232 ], 233 "plugins": { 234 "requires": "nsPlugin" 235 }, 236 "setup": [ 237 "$TC qdisc add dev $DEV1 ingress" 238 ], 239 "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 prio 1 fw action reclassify", 240 "expExitCode": "0", 241 "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol all fw", 242 "matchPattern": "handle 0x1.*gact action reclassify", 243 "matchCount": "1", 244 "teardown": [ 245 "$TC qdisc del dev $DEV1 ingress" 246 ] 247 }, 248 { 249 "id": "3bc2", 250 "name": "Add fw filter with action reclassify by reference", 251 "category": [ 252 "filter", 253 "fw" 254 ], 255 "plugins": { 256 "requires": "nsPlugin" 257 }, 258 "setup": [ 259 "$TC qdisc add dev $DEV1 ingress", 260 "$TC actions add action gact reclassify index 1" 261 ], 262 "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 prio 1 fw action gact index 1", 263 "expExitCode": "0", 264 "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol all fw", 265 "matchPattern": "handle 0x1.*gact action reclassify.*index 1 ref 2 bind 1", 266 "matchCount": "1", 267 "teardown": [ 268 "$TC qdisc del dev $DEV1 ingress" 269 ] 270 }, 271 { 272 "id": "95bb", 273 "name": "Add fw filter with action jump 10", 274 "category": [ 275 "filter", 276 "fw" 277 ], 278 "plugins": { 279 "requires": "nsPlugin" 280 }, 281 "setup": [ 282 "$TC qdisc add dev $DEV1 ingress" 283 ], 284 "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 prio 1 fw action jump 10", 285 "expExitCode": "0", 286 "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol all fw", 287 "matchPattern": "handle 0x1.*gact action jump 10", 288 "matchCount": "1", 289 "teardown": [ 290 "$TC qdisc del dev $DEV1 ingress" 291 ] 292 }, 293 { 294 "id": "36f7", 295 "name": "Add fw filter with action jump 10 by reference", 296 "category": [ 297 "filter", 298 "fw" 299 ], 300 "plugins": { 301 "requires": "nsPlugin" 302 }, 303 "setup": [ 304 "$TC qdisc add dev $DEV1 ingress", 305 "$TC actions add action gact jump 10 index 1" 306 ], 307 "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 prio 1 fw action gact index 1", 308 "expExitCode": "0", 309 "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol all fw", 310 "matchPattern": "handle 0x1.*gact action jump 10.*index 1 ref 2 bind 1", 311 "matchCount": "1", 312 "teardown": [ 313 "$TC qdisc del dev $DEV1 ingress" 314 ] 315 }, 316 { 317 "id": "3d74", 318 "name": "Add fw filter with action goto chain 5", 319 "category": [ 320 "filter", 321 "fw" 322 ], 323 "plugins": { 324 "requires": "nsPlugin" 325 }, 326 "setup": [ 327 "$TC qdisc add dev $DEV1 ingress" 328 ], 329 "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 prio 1 fw action goto chain 5", 330 "expExitCode": "0", 331 "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol all fw", 332 "matchPattern": "handle 0x1.*gact action goto chain 5", 333 "matchCount": "1", 334 "teardown": [ 335 "$TC qdisc del dev $DEV1 ingress" 336 ] 337 }, 338 { 339 "id": "eb8f", 340 "name": "Add fw filter with invalid action", 341 "category": [ 342 "filter", 343 "fw" 344 ], 345 "plugins": { 346 "requires": "nsPlugin" 347 }, 348 "setup": [ 349 "$TC qdisc add dev $DEV1 ingress" 350 ], 351 "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 prio 1 fw action pump", 352 "expExitCode": "255", 353 "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol all fw", 354 "matchPattern": "handle 0x1.*gact action pump", 355 "matchCount": "0", 356 "teardown": [ 357 "$TC qdisc del dev $DEV1 ingress" 358 ] 359 }, 360 { 361 "id": "6a79", 362 "name": "Add fw filter with missing mandatory action", 363 "category": [ 364 "filter", 365 "fw" 366 ], 367 "plugins": { 368 "requires": "nsPlugin" 369 }, 370 "setup": [ 371 "$TC qdisc add dev $DEV1 ingress" 372 ], 373 "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 prio 1 fw", 374 "expExitCode": "2", 375 "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol all fw", 376 "matchPattern": "filter protocol all pref [0-9]+ fw.*handle 0x1", 377 "matchCount": "0", 378 "teardown": [ 379 "$TC qdisc del dev $DEV1 ingress" 380 ] 381 }, 382 { 383 "id": "8298", 384 "name": "Add fw filter with cookie", 385 "category": [ 386 "filter", 387 "fw" 388 ], 389 "plugins": { 390 "requires": "nsPlugin" 391 }, 392 "setup": [ 393 "$TC qdisc add dev $DEV1 ingress" 394 ], 395 "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 prio 2 fw action pipe cookie aa11bb22cc33dd44ee55ff66aa11b1b2", 396 "expExitCode": "0", 397 "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 2 protocol all fw", 398 "matchPattern": "pref 2 fw.*handle 0x1.*gact action pipe.*cookie aa11bb22cc33dd44ee55ff66aa11b1b2", 399 "matchCount": "1", 400 "teardown": [ 401 "$TC qdisc del dev $DEV1 ingress" 402 ] 403 }, 404 { 405 "id": "a88c", 406 "name": "Add fw filter with invalid cookie", 407 "category": [ 408 "filter", 409 "fw" 410 ], 411 "plugins": { 412 "requires": "nsPlugin" 413 }, 414 "setup": [ 415 "$TC qdisc add dev $DEV1 ingress" 416 ], 417 "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 prio 2 fw action continue cookie aa11bb22cc33dd44ee55ff66aa11b1b2777888", 418 "expExitCode": "255", 419 "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 2 protocol all fw", 420 "matchPattern": "pref 2 fw.*handle 0x1.*gact action continue.*cookie aa11bb22cc33dd44ee55ff66aa11b1b2777888", 421 "matchCount": "0", 422 "teardown": [ 423 "$TC qdisc del dev $DEV1 ingress" 424 ] 425 }, 426 { 427 "id": "10f6", 428 "name": "Add fw filter with handle in hex", 429 "category": [ 430 "filter", 431 "fw" 432 ], 433 "plugins": { 434 "requires": "nsPlugin" 435 }, 436 "setup": [ 437 "$TC qdisc add dev $DEV1 ingress" 438 ], 439 "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 0xa1b2ff prio 1 fw action ok", 440 "expExitCode": "0", 441 "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 0xa1b2ff prio 1 protocol all fw", 442 "matchPattern": "fw.*handle 0xa1b2ff.*gact action pass", 443 "matchCount": "1", 444 "teardown": [ 445 "$TC qdisc del dev $DEV1 ingress" 446 ] 447 }, 448 { 449 "id": "9d51", 450 "name": "Add fw filter with handle at 32-bit maximum", 451 "category": [ 452 "filter", 453 "fw" 454 ], 455 "plugins": { 456 "requires": "nsPlugin" 457 }, 458 "setup": [ 459 "$TC qdisc add dev $DEV1 ingress" 460 ], 461 "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 4294967295 prio 1 fw action ok", 462 "expExitCode": "0", 463 "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 4294967295 prio 1 protocol all fw", 464 "matchPattern": "fw.*handle 0xffffffff.*gact action pass", 465 "matchCount": "1", 466 "teardown": [ 467 "$TC qdisc del dev $DEV1 ingress" 468 ] 469 }, 470 { 471 "id": "d939", 472 "name": "Add fw filter with handle exceeding 32-bit maximum", 473 "category": [ 474 "filter", 475 "fw" 476 ], 477 "plugins": { 478 "requires": "nsPlugin" 479 }, 480 "setup": [ 481 "$TC qdisc add dev $DEV1 ingress" 482 ], 483 "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 4294967296 prio 1 fw action ok", 484 "expExitCode": "1", 485 "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 4294967296 prio 1 protocol all fw", 486 "matchPattern": "fw.*handle 0x.*gact action pass", 487 "matchCount": "0", 488 "teardown": [ 489 "$TC qdisc del dev $DEV1 ingress" 490 ] 491 }, 492 { 493 "id": "658c", 494 "name": "Add fw filter with mask in hex", 495 "category": [ 496 "filter", 497 "fw" 498 ], 499 "plugins": { 500 "requires": "nsPlugin" 501 }, 502 "setup": [ 503 "$TC qdisc add dev $DEV1 ingress" 504 ], 505 "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 10/0xa1b2f prio 1 fw action ok", 506 "expExitCode": "0", 507 "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 10 prio 1 protocol all fw", 508 "matchPattern": "fw.*handle 0xa/0xa1b2f", 509 "matchCount": "1", 510 "teardown": [ 511 "$TC qdisc del dev $DEV1 ingress" 512 ] 513 }, 514 { 515 "id": "86be", 516 "name": "Add fw filter with mask at 32-bit maximum", 517 "category": [ 518 "filter", 519 "fw" 520 ], 521 "plugins": { 522 "requires": "nsPlugin" 523 }, 524 "setup": [ 525 "$TC qdisc add dev $DEV1 ingress" 526 ], 527 "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 10/4294967295 prio 1 fw action ok", 528 "expExitCode": "0", 529 "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 10 prio 1 protocol all fw", 530 "matchPattern": "fw.*handle 0xa[^/]", 531 "matchCount": "1", 532 "teardown": [ 533 "$TC qdisc del dev $DEV1 ingress" 534 ] 535 }, 536 { 537 "id": "e635", 538 "name": "Add fw filter with mask exceeding 32-bit maximum", 539 "category": [ 540 "filter", 541 "fw" 542 ], 543 "plugins": { 544 "requires": "nsPlugin" 545 }, 546 "setup": [ 547 "$TC qdisc add dev $DEV1 ingress" 548 ], 549 "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 10/4294967296 prio 1 fw action ok", 550 "expExitCode": "1", 551 "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 10 prio 1 protocol all fw", 552 "matchPattern": "fw.*handle 0xa", 553 "matchCount": "0", 554 "teardown": [ 555 "$TC qdisc del dev $DEV1 ingress" 556 ] 557 }, 558 { 559 "id": "6cab", 560 "name": "Add fw filter with handle/mask in hex", 561 "category": [ 562 "filter", 563 "fw" 564 ], 565 "plugins": { 566 "requires": "nsPlugin" 567 }, 568 "setup": [ 569 "$TC qdisc add dev $DEV1 ingress" 570 ], 571 "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 0xa1b2cdff/0x1a2bffdc prio 1 fw action ok", 572 "expExitCode": "0", 573 "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 0xa1b2cdff prio 1 protocol all fw", 574 "matchPattern": "fw.*handle 0xa1b2cdff/0x1a2bffdc", 575 "matchCount": "1", 576 "teardown": [ 577 "$TC qdisc del dev $DEV1 ingress" 578 ] 579 }, 580 { 581 "id": "8700", 582 "name": "Add fw filter with handle/mask at 32-bit maximum", 583 "category": [ 584 "filter", 585 "fw" 586 ], 587 "plugins": { 588 "requires": "nsPlugin" 589 }, 590 "setup": [ 591 "$TC qdisc add dev $DEV1 ingress" 592 ], 593 "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 4294967295/4294967295 prio 1 fw action ok", 594 "expExitCode": "0", 595 "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 0xffffffff prio 1 protocol all fw", 596 "matchPattern": "fw.*handle 0xffffffff[^/]", 597 "matchCount": "1", 598 "teardown": [ 599 "$TC qdisc del dev $DEV1 ingress" 600 ] 601 }, 602 { 603 "id": "7d62", 604 "name": "Add fw filter with handle/mask exceeding 32-bit maximum", 605 "category": [ 606 "filter", 607 "fw" 608 ], 609 "plugins": { 610 "requires": "nsPlugin" 611 }, 612 "setup": [ 613 "$TC qdisc add dev $DEV1 ingress" 614 ], 615 "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 4294967296/4294967296 prio 1 fw action ok", 616 "expExitCode": "1", 617 "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 10 prio 1 protocol all fw", 618 "matchPattern": "fw.*handle", 619 "matchCount": "0", 620 "teardown": [ 621 "$TC qdisc del dev $DEV1 ingress" 622 ] 623 }, 624 { 625 "id": "7b69", 626 "name": "Add fw filter with missing mandatory handle", 627 "category": [ 628 "filter", 629 "fw" 630 ], 631 "plugins": { 632 "requires": "nsPlugin" 633 }, 634 "setup": [ 635 "$TC qdisc add dev $DEV1 ingress" 636 ], 637 "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: prio 1 fw action ok", 638 "expExitCode": "2", 639 "verifyCmd": "$TC filter show dev $DEV1 parent ffff:", 640 "matchPattern": "filter protocol all.*fw.*handle.*gact action pass", 641 "matchCount": "0", 642 "teardown": [ 643 "$TC qdisc del dev $DEV1 ingress" 644 ] 645 }, 646 { 647 "id": "d68b", 648 "name": "Add fw filter with invalid parent", 649 "category": [ 650 "filter", 651 "fw" 652 ], 653 "plugins": { 654 "requires": "nsPlugin" 655 }, 656 "setup": [ 657 "$TC qdisc add dev $DEV1 ingress" 658 ], 659 "cmdUnderTest": "$TC filter add dev $DEV1 parent aa11b1b2: handle 1 prio 1 fw action ok", 660 "expExitCode": "255", 661 "verifyCmd": "$TC filter dev $DEV1 parent aa11b1b2: handle 1 prio 1 protocol all fw", 662 "matchPattern": "filter protocol all pref 1 fw.*handle 0x1.*gact action pass", 663 "matchCount": "0", 664 "teardown": [ 665 "$TC qdisc del dev $DEV1 ingress" 666 ] 667 }, 668 { 669 "id": "66e0", 670 "name": "Add fw filter with missing mandatory parent id", 671 "category": [ 672 "filter", 673 "fw" 674 ], 675 "plugins": { 676 "requires": "nsPlugin" 677 }, 678 "setup": [ 679 "$TC qdisc add dev $DEV1 ingress" 680 ], 681 "cmdUnderTest": "$TC filter add dev $DEV1 handle 1 prio 1 fw action ok", 682 "expExitCode": "2", 683 "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol all fw", 684 "matchPattern": "pref [0-9]+ fw.*handle 0x1.*gact action pass", 685 "matchCount": "0", 686 "teardown": [ 687 "$TC qdisc del dev $DEV1 ingress" 688 ] 689 }, 690 { 691 "id": "0ff3", 692 "name": "Add fw filter with classid", 693 "category": [ 694 "filter", 695 "fw" 696 ], 697 "plugins": { 698 "requires": "nsPlugin" 699 }, 700 "setup": [ 701 "$TC qdisc add dev $DEV1 ingress" 702 ], 703 "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 prio 1 fw classid 3 action ok", 704 "expExitCode": "0", 705 "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol all fw", 706 "matchPattern": "fw.*handle 0x1 classid :3.*gact action pass", 707 "matchCount": "1", 708 "teardown": [ 709 "$TC qdisc del dev $DEV1 ingress" 710 ] 711 }, 712 { 713 "id": "9849", 714 "name": "Add fw filter with classid at root", 715 "category": [ 716 "filter", 717 "fw" 718 ], 719 "plugins": { 720 "requires": "nsPlugin" 721 }, 722 "setup": [ 723 "$TC qdisc add dev $DEV1 ingress" 724 ], 725 "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 prio 1 fw classid ffff:ffff action ok", 726 "expExitCode": "0", 727 "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol all fw", 728 "matchPattern": "pref 1 fw.*handle 0x1 classid root.*gact action pass", 729 "matchCount": "1", 730 "teardown": [ 731 "$TC qdisc del dev $DEV1 ingress" 732 ] 733 }, 734 { 735 "id": "b7ff", 736 "name": "Add fw filter with classid - keeps last 8 (hex) digits", 737 "category": [ 738 "filter", 739 "fw" 740 ], 741 "plugins": { 742 "requires": "nsPlugin" 743 }, 744 "setup": [ 745 "$TC qdisc add dev $DEV1 ingress" 746 ], 747 "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 prio 1 fw classid 98765fedcb action ok", 748 "expExitCode": "0", 749 "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol all fw", 750 "matchPattern": "fw.*handle 0x1 classid 765f:edcb.*gact action pass", 751 "matchCount": "1", 752 "teardown": [ 753 "$TC qdisc del dev $DEV1 ingress" 754 ] 755 }, 756 { 757 "id": "2b18", 758 "name": "Add fw filter with invalid classid", 759 "category": [ 760 "filter", 761 "fw" 762 ], 763 "plugins": { 764 "requires": "nsPlugin" 765 }, 766 "setup": [ 767 "$TC qdisc add dev $DEV1 ingress" 768 ], 769 "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 1 prio 1 fw classid 6789defg action ok", 770 "expExitCode": "1", 771 "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol all fw", 772 "matchPattern": "fw.*handle 0x1 classid 6789:defg.*gact action pass", 773 "matchCount": "0", 774 "teardown": [ 775 "$TC qdisc del dev $DEV1 ingress" 776 ] 777 }, 778 { 779 "id": "fade", 780 "name": "Add fw filter with flowid", 781 "category": [ 782 "filter", 783 "fw" 784 ], 785 "plugins": { 786 "requires": "nsPlugin" 787 }, 788 "setup": [ 789 "$TC qdisc add dev $DEV1 ingress" 790 ], 791 "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 10 prio 1 fw flowid 1:10 action ok", 792 "expExitCode": "0", 793 "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 10 prio 1 protocol all fw", 794 "matchPattern": "filter parent ffff: protocol all pref 1 fw.*handle 0xa classid 1:10.*gact action pass", 795 "matchCount": "1", 796 "teardown": [ 797 "$TC qdisc del dev $DEV1 ingress" 798 ] 799 }, 800 { 801 "id": "33af", 802 "name": "Add fw filter with flowid then classid (same arg, takes second)", 803 "category": [ 804 "filter", 805 "fw" 806 ], 807 "plugins": { 808 "requires": "nsPlugin" 809 }, 810 "setup": [ 811 "$TC qdisc add dev $DEV1 ingress" 812 ], 813 "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 11 prio 1 fw flowid 10 classid 4 action ok", 814 "expExitCode": "0", 815 "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 11 prio 1 protocol all fw", 816 "matchPattern": "filter parent ffff: protocol all pref 1 fw.*handle 0xb classid :4.*gact action pass", 817 "matchCount": "1", 818 "teardown": [ 819 "$TC qdisc del dev $DEV1 ingress" 820 ] 821 }, 822 { 823 "id": "8a8c", 824 "name": "Add fw filter with classid then flowid (same arg, takes second)", 825 "category": [ 826 "filter", 827 "fw" 828 ], 829 "plugins": { 830 "requires": "nsPlugin" 831 }, 832 "setup": [ 833 "$TC qdisc add dev $DEV1 ingress" 834 ], 835 "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: handle 11 prio 1 fw classid 4 flowid 10 action ok", 836 "expExitCode": "0", 837 "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 11 prio 1 protocol all fw", 838 "matchPattern": "filter parent ffff: protocol all pref 1 fw.*handle 0xb classid :10.*gact action pass", 839 "matchCount": "1", 840 "teardown": [ 841 "$TC qdisc del dev $DEV1 ingress" 842 ] 843 }, 844 { 845 "id": "b50d", 846 "name": "Add fw filter with handle val/mask and flowid 10:1000", 847 "category": [ 848 "filter", 849 "fw" 850 ], 851 "plugins": { 852 "requires": "nsPlugin" 853 }, 854 "setup": [ 855 "$TC qdisc add dev $DEV1 ingress" 856 ], 857 "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: prio 3 handle 10/0xff fw flowid 10:1000 action ok", 858 "expExitCode": "0", 859 "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 10 prio 3 protocol all fw", 860 "matchPattern": "filter parent ffff: protocol all pref 3 fw.*handle 0xa/0xff classid 10:1000.*gact action pass", 861 "matchCount": "1", 862 "teardown": [ 863 "$TC qdisc del dev $DEV1 ingress" 864 ] 865 }, 866 { 867 "id": "7207", 868 "name": "Add fw filter with protocol ip", 869 "category": [ 870 "filter", 871 "fw" 872 ], 873 "plugins": { 874 "requires": "nsPlugin" 875 }, 876 "setup": [ 877 "$TC qdisc add dev $DEV1 ingress" 878 ], 879 "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: protocol ip prio 1 handle 3 fw action ok", 880 "expExitCode": "0", 881 "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 3 prio 1 protocol ip fw", 882 "matchPattern": "filter parent ffff: protocol ip pref 1 fw.*handle 0x3.*gact action pass.*index [0-9]+ ref [0-9]+ bind [0-9]+", 883 "matchCount": "1", 884 "teardown": [ 885 "$TC qdisc del dev $DEV1 ingress" 886 ] 887 }, 888 { 889 "id": "306d", 890 "name": "Add fw filter with protocol ipv6", 891 "category": [ 892 "filter", 893 "fw" 894 ], 895 "plugins": { 896 "requires": "nsPlugin" 897 }, 898 "setup": [ 899 "$TC qdisc add dev $DEV1 ingress" 900 ], 901 "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: protocol ipv6 prio 2 handle 4 fw action ok", 902 "expExitCode": "0", 903 "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 4 prio 2 protocol ipv6 fw", 904 "matchPattern": "filter parent ffff: protocol ipv6 pref 2 fw.*handle 0x4.*gact action pass.*index [0-9]+ ref [0-9]+ bind [0-9]+", 905 "matchCount": "1", 906 "teardown": [ 907 "$TC qdisc del dev $DEV1 ingress" 908 ] 909 }, 910 { 911 "id": "9a78", 912 "name": "Add fw filter with protocol arp", 913 "category": [ 914 "filter", 915 "fw" 916 ], 917 "plugins": { 918 "requires": "nsPlugin" 919 }, 920 "setup": [ 921 "$TC qdisc add dev $DEV1 ingress" 922 ], 923 "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: protocol arp prio 5 handle 7 fw action drop", 924 "expExitCode": "0", 925 "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 7 prio 5 protocol arp fw", 926 "matchPattern": "filter parent ffff: protocol arp pref 5 fw.*handle 0x7.*gact action drop.*index [0-9]+ ref [0-9]+ bind [0-9]+", 927 "matchCount": "1", 928 "teardown": [ 929 "$TC qdisc del dev $DEV1 ingress" 930 ] 931 }, 932 { 933 "id": "1821", 934 "name": "Add fw filter with protocol 802_3", 935 "category": [ 936 "filter", 937 "fw" 938 ], 939 "plugins": { 940 "requires": "nsPlugin" 941 }, 942 "setup": [ 943 "$TC qdisc add dev $DEV1 ingress" 944 ], 945 "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: protocol 802_3 handle 1 prio 1 fw action ok", 946 "expExitCode": "0", 947 "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol 802_3 fw", 948 "matchPattern": "filter parent ffff: protocol 802_3 pref 1 fw.*handle 0x1.*gact action pass", 949 "matchCount": "1", 950 "teardown": [ 951 "$TC qdisc del dev $DEV1 ingress" 952 ] 953 }, 954 { 955 "id": "2260", 956 "name": "Add fw filter with invalid protocol", 957 "category": [ 958 "filter", 959 "fw" 960 ], 961 "plugins": { 962 "requires": "nsPlugin" 963 }, 964 "setup": [ 965 "$TC qdisc add dev $DEV1 ingress" 966 ], 967 "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: protocol igmp handle 1 prio 1 fw action ok", 968 "expExitCode": "255", 969 "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 1 prio 1 protocol igmp fw", 970 "matchPattern": "filter parent ffff: protocol igmp pref 1 fw.*handle 0x1.*gact action pass", 971 "matchCount": "0", 972 "teardown": [ 973 "$TC qdisc del dev $DEV1 ingress" 974 ] 975 }, 976 { 977 "id": "09d7", 978 "name": "Add fw filters protocol 802_3 and ip with conflicting priorities", 979 "category": [ 980 "filter", 981 "fw" 982 ], 983 "plugins": { 984 "requires": "nsPlugin" 985 }, 986 "setup": [ 987 "$TC qdisc add dev $DEV1 ingress", 988 "$TC filter add dev $DEV1 parent ffff: protocol 802_3 prio 3 handle 7 fw action ok" 989 ], 990 "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: protocol ip prio 3 handle 8 fw action ok", 991 "expExitCode": "2", 992 "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 8 prio 3 protocol ip fw", 993 "matchPattern": "filter parent ffff: protocol ip pref 3 fw.*handle 0x8", 994 "matchCount": "0", 995 "teardown": [ 996 "$TC qdisc del dev $DEV1 ingress" 997 ] 998 }, 999 { 1000 "id": "6973", 1001 "name": "Add fw filters with same index, same action", 1002 "category": [ 1003 "filter", 1004 "fw" 1005 ], 1006 "plugins": { 1007 "requires": "nsPlugin" 1008 }, 1009 "setup": [ 1010 "$TC qdisc add dev $DEV1 ingress", 1011 "$TC filter add dev $DEV1 parent ffff: prio 6 handle 2 fw action continue index 5" 1012 ], 1013 "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: prio 8 handle 4 fw action continue index 5", 1014 "expExitCode": "0", 1015 "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 4 prio 8 protocol all fw", 1016 "matchPattern": "filter parent ffff: protocol all pref 8 fw.*handle 0x4.*gact action continue.*index 5 ref 2 bind 2", 1017 "matchCount": "1", 1018 "teardown": [ 1019 "$TC qdisc del dev $DEV1 ingress" 1020 ] 1021 }, 1022 { 1023 "id": "fc06", 1024 "name": "Add fw filters with action police", 1025 "category": [ 1026 "filter", 1027 "fw" 1028 ], 1029 "plugins": { 1030 "requires": "nsPlugin" 1031 }, 1032 "setup": [ 1033 "$TC qdisc add dev $DEV1 ingress" 1034 ], 1035 "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: prio 3 handle 4 fw action police rate 1kbit burst 10k index 5", 1036 "expExitCode": "0", 1037 "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 4 prio 3 protocol all fw", 1038 "matchPattern": "filter parent ffff: protocol all pref 3 fw.*handle 0x4.*police 0x5 rate 1Kbit burst 10Kb mtu 2Kb action reclassify overhead 0b.*ref 1 bind 1", 1039 "matchCount": "1", 1040 "teardown": [ 1041 "$TC qdisc del dev $DEV1 ingress" 1042 ] 1043 }, 1044 { 1045 "id": "aac7", 1046 "name": "Add fw filters with action police linklayer atm", 1047 "category": [ 1048 "filter", 1049 "fw" 1050 ], 1051 "plugins": { 1052 "requires": "nsPlugin" 1053 }, 1054 "setup": [ 1055 "$TC qdisc add dev $DEV1 ingress" 1056 ], 1057 "cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: prio 3 handle 4 fw action police rate 2mbit burst 200k linklayer atm index 8", 1058 "expExitCode": "0", 1059 "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 4 prio 3 protocol all fw", 1060 "matchPattern": "filter parent ffff: protocol all pref 3 fw.*handle 0x4.*police 0x8 rate 2Mbit burst 200Kb mtu 2Kb action reclassify overhead 0b linklayer atm.*ref 1 bind 1", 1061 "matchCount": "1", 1062 "teardown": [ 1063 "$TC qdisc del dev $DEV1 ingress" 1064 ] 1065 }, 1066 { 1067 "id": "5339", 1068 "name": "Del entire fw filter", 1069 "category": [ 1070 "filter", 1071 "fw" 1072 ], 1073 "plugins": { 1074 "requires": "nsPlugin" 1075 }, 1076 "setup": [ 1077 "$TC qdisc add dev $DEV1 ingress", 1078 "$TC filter add dev $DEV1 parent ffff: handle 5 prio 7 fw action pass", 1079 "$TC filter add dev $DEV1 parent ffff: handle 3 prio 9 fw action pass" 1080 ], 1081 "cmdUnderTest": "$TC filter del dev $DEV1 parent ffff:", 1082 "expExitCode": "0", 1083 "verifyCmd": "$TC filter show dev $DEV1 parent ffff:", 1084 "matchPattern": "protocol all pref.*handle.*gact action pass", 1085 "matchCount": "0", 1086 "teardown": [ 1087 "$TC qdisc del dev $DEV1 ingress" 1088 ] 1089 }, 1090 { 1091 "id": "0e99", 1092 "name": "Del single fw filter x1", 1093 "category": [ 1094 "filter", 1095 "fw" 1096 ], 1097 "plugins": { 1098 "requires": "nsPlugin" 1099 }, 1100 "setup": [ 1101 "$TC qdisc add dev $DEV1 ingress", 1102 "$TC filter add dev $DEV1 parent ffff: handle 5 prio 7 fw action pass", 1103 "$TC filter add dev $DEV1 parent ffff: handle 3 prio 9 fw action pass" 1104 ], 1105 "cmdUnderTest": "$TC filter del dev $DEV1 parent ffff: handle 3 prio 9 fw action pass", 1106 "expExitCode": "0", 1107 "verifyCmd": "$TC filter show dev $DEV1 parent ffff:", 1108 "matchPattern": "protocol all pref 7.*handle 0x5.*gact action pass", 1109 "matchCount": "1", 1110 "teardown": [ 1111 "$TC qdisc del dev $DEV1 ingress" 1112 ] 1113 }, 1114 { 1115 "id": "f54c", 1116 "name": "Del single fw filter x2", 1117 "category": [ 1118 "filter", 1119 "fw" 1120 ], 1121 "plugins": { 1122 "requires": "nsPlugin" 1123 }, 1124 "setup": [ 1125 "$TC qdisc add dev $DEV1 ingress", 1126 "$TC filter add dev $DEV1 parent ffff: handle 5 prio 7 fw action pass", 1127 "$TC filter add dev $DEV1 parent ffff: handle 3 prio 9 fw action pass" 1128 ], 1129 "cmdUnderTest": "$TC filter del dev $DEV1 parent ffff: handle 3 prio 9 fw action pass", 1130 "expExitCode": "0", 1131 "verifyCmd": "$TC filter show dev $DEV1 parent ffff:", 1132 "matchPattern": "protocol all pref 9.*handle 0x3.*gact action pass", 1133 "matchCount": "0", 1134 "teardown": [ 1135 "$TC qdisc del dev $DEV1 ingress" 1136 ] 1137 }, 1138 { 1139 "id": "ba94", 1140 "name": "Del fw filter by prio", 1141 "category": [ 1142 "filter", 1143 "fw" 1144 ], 1145 "plugins": { 1146 "requires": "nsPlugin" 1147 }, 1148 "setup": [ 1149 "$TC qdisc add dev $DEV1 ingress", 1150 "$TC filter add dev $DEV1 parent ffff: handle 1 prio 4 fw action ok", 1151 "$TC filter add dev $DEV1 parent ffff: handle 2 prio 4 fw action ok" 1152 ], 1153 "cmdUnderTest": "$TC filter del dev $DEV1 parent ffff: prio 4", 1154 "expExitCode": "0", 1155 "verifyCmd": "$TC filter show dev $DEV1 parent ffff:", 1156 "matchPattern": "pref 4 fw.*gact action pass", 1157 "matchCount": "0", 1158 "teardown": [ 1159 "$TC qdisc del dev $DEV1 ingress" 1160 ] 1161 }, 1162 { 1163 "id": "4acb", 1164 "name": "Del fw filter by chain", 1165 "category": [ 1166 "filter", 1167 "fw" 1168 ], 1169 "plugins": { 1170 "requires": "nsPlugin" 1171 }, 1172 "setup": [ 1173 "$TC qdisc add dev $DEV1 ingress", 1174 "$TC filter add dev $DEV1 parent ffff: handle 4 prio 2 chain 13 fw action pipe", 1175 "$TC filter add dev $DEV1 parent ffff: handle 3 prio 5 chain 13 fw action pipe" 1176 ], 1177 "cmdUnderTest": "$TC filter del dev $DEV1 parent ffff: chain 13", 1178 "expExitCode": "0", 1179 "verifyCmd": "$TC filter show dev $DEV1 parent ffff:", 1180 "matchPattern": "fw chain 13 handle.*gact action pipe", 1181 "matchCount": "0", 1182 "teardown": [ 1183 "$TC qdisc del dev $DEV1 ingress" 1184 ] 1185 }, 1186 { 1187 "id": "3424", 1188 "name": "Del fw filter by action (invalid)", 1189 "category": [ 1190 "filter", 1191 "fw" 1192 ], 1193 "plugins": { 1194 "requires": "nsPlugin" 1195 }, 1196 "setup": [ 1197 "$TC qdisc add dev $DEV1 ingress", 1198 "$TC filter add dev $DEV1 parent ffff: handle 2 prio 4 fw action drop" 1199 ], 1200 "cmdUnderTest": "$TC filter del dev $DEV1 parent ffff: fw action drop", 1201 "expExitCode": "2", 1202 "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 2 prio 4 protocol all fw", 1203 "matchPattern": "handle 0x2.*gact action drop", 1204 "matchCount": "1", 1205 "teardown": [ 1206 "$TC qdisc del dev $DEV1 ingress" 1207 ] 1208 }, 1209 { 1210 "id": "da89", 1211 "name": "Del fw filter by handle (invalid)", 1212 "category": [ 1213 "filter", 1214 "fw" 1215 ], 1216 "plugins": { 1217 "requires": "nsPlugin" 1218 }, 1219 "setup": [ 1220 "$TC qdisc add dev $DEV1 ingress", 1221 "$TC filter add dev $DEV1 parent ffff: handle 3 prio 4 fw action continue" 1222 ], 1223 "cmdUnderTest": "$TC filter del dev $DEV1 parent ffff: handle 3 fw", 1224 "expExitCode": "2", 1225 "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 3 prio 4 protocol all fw", 1226 "matchPattern": "handle 0x3.*gact action continue", 1227 "matchCount": "1", 1228 "teardown": [ 1229 "$TC qdisc del dev $DEV1 ingress" 1230 ] 1231 }, 1232 { 1233 "id": "4d95", 1234 "name": "Del fw filter by protocol (invalid)", 1235 "category": [ 1236 "filter", 1237 "fw" 1238 ], 1239 "plugins": { 1240 "requires": "nsPlugin" 1241 }, 1242 "setup": [ 1243 "$TC qdisc add dev $DEV1 ingress", 1244 "$TC filter add dev $DEV1 parent ffff: handle 4 prio 2 protocol arp fw action pipe" 1245 ], 1246 "cmdUnderTest": "$TC filter del dev $DEV1 parent ffff: protocol arp fw", 1247 "expExitCode": "2", 1248 "verifyCmd": "$TC filter get dev $DEV1 parent ffff: handle 4 prio 2 protocol arp fw", 1249 "matchPattern": "filter parent ffff: protocol arp.*handle 0x4.*gact action pipe", 1250 "matchCount": "1", 1251 "teardown": [ 1252 "$TC qdisc del dev $DEV1 ingress" 1253 ] 1254 }, 1255 { 1256 "id": "4736", 1257 "name": "Del fw filter by flowid (invalid)", 1258 "category": [ 1259 "filter", 1260 "fw" 1261 ], 1262 "plugins": { 1263 "requires": "nsPlugin" 1264 }, 1265 "setup": [ 1266 "$TC qdisc add dev $DEV1 ingress", 1267 "$TC filter add dev $DEV1 parent ffff: handle 4 prio 2 fw action pipe flowid 45" 1268 ], 1269 "cmdUnderTest": "$TC filter del dev $DEV1 parent ffff: fw flowid 45", 1270 "expExitCode": "2", 1271 "verifyCmd": "$TC filter show dev $DEV1 parent ffff:", 1272 "matchPattern": "handle 0x4.*gact action pipe", 1273 "matchCount": "1", 1274 "teardown": [ 1275 "$TC qdisc del dev $DEV1 ingress" 1276 ] 1277 }, 1278 { 1279 "id": "3dcb", 1280 "name": "Replace fw filter action", 1281 "category": [ 1282 "filter", 1283 "fw" 1284 ], 1285 "plugins": { 1286 "requires": "nsPlugin" 1287 }, 1288 "setup": [ 1289 "$TC qdisc add dev $DEV1 ingress", 1290 "$TC filter add dev $DEV1 parent ffff: handle 1 prio 2 fw action ok" 1291 ], 1292 "cmdUnderTest": "$TC filter replace dev $DEV1 parent ffff: handle 1 prio 2 fw action pipe", 1293 "expExitCode": "0", 1294 "verifyCmd": "$TC filter show dev $DEV1 parent ffff:", 1295 "matchPattern": "pref 2 fw.*handle 0x1.*gact action pipe", 1296 "matchCount": "1", 1297 "teardown": [ 1298 "$TC qdisc del dev $DEV1 ingress" 1299 ] 1300 }, 1301 { 1302 "id": "eb4d", 1303 "name": "Replace fw filter classid", 1304 "category": [ 1305 "filter", 1306 "fw" 1307 ], 1308 "plugins": { 1309 "requires": "nsPlugin" 1310 }, 1311 "setup": [ 1312 "$TC qdisc add dev $DEV1 ingress", 1313 "$TC filter add dev $DEV1 parent ffff: handle 1 prio 2 fw action ok" 1314 ], 1315 "cmdUnderTest": "$TC filter replace dev $DEV1 parent ffff: handle 1 prio 2 fw action pipe classid 2", 1316 "expExitCode": "0", 1317 "verifyCmd": "$TC filter show dev $DEV1 parent ffff:", 1318 "matchPattern": "pref 2 fw.*handle 0x1 classid :2.*gact action pipe", 1319 "matchCount": "1", 1320 "teardown": [ 1321 "$TC qdisc del dev $DEV1 ingress" 1322 ] 1323 }, 1324 { 1325 "id": "67ec", 1326 "name": "Replace fw filter index", 1327 "category": [ 1328 "filter", 1329 "fw" 1330 ], 1331 "plugins": { 1332 "requires": "nsPlugin" 1333 }, 1334 "setup": [ 1335 "$TC qdisc add dev $DEV1 ingress", 1336 "$TC filter add dev $DEV1 parent ffff: handle 1 prio 2 fw action ok index 3" 1337 ], 1338 "cmdUnderTest": "$TC filter replace dev $DEV1 parent ffff: handle 1 prio 2 fw action ok index 16", 1339 "expExitCode": "0", 1340 "verifyCmd": "$TC filter show dev $DEV1 parent ffff:", 1341 "matchPattern": "pref 2 fw.*handle 0x1.*gact action pass.*index 16", 1342 "matchCount": "1", 1343 "teardown": [ 1344 "$TC qdisc del dev $DEV1 ingress" 1345 ] 1346 }, 1347 { 1348 "id": "e470", 1349 "name": "Try to delete class referenced by fw after a replace", 1350 "category": [ 1351 "filter", 1352 "fw" 1353 ], 1354 "plugins": { 1355 "requires": "nsPlugin" 1356 }, 1357 "setup": [ 1358 "$TC qdisc add dev $DEV1 parent root handle 10: drr", 1359 "$TC class add dev $DEV1 parent root classid 1 drr", 1360 "$TC filter add dev $DEV1 parent 10: handle 1 prio 1 fw classid 10:1 action ok", 1361 "$TC filter replace dev $DEV1 parent 10: handle 1 prio 1 fw classid 10:1 action drop" 1362 ], 1363 "cmdUnderTest": "$TC class delete dev $DEV1 parent 10: classid 10:1", 1364 "expExitCode": "2", 1365 "verifyCmd": "$TC class show dev $DEV1", 1366 "matchPattern": "class drr 10:1", 1367 "matchCount": "1", 1368 "teardown": [ 1369 "$TC qdisc del dev $DEV1 parent root drr" 1370 ] 1371 }, 1372 { 1373 "id": "ec1a", 1374 "name": "Replace fw classid with nil", 1375 "category": [ 1376 "filter", 1377 "fw" 1378 ], 1379 "plugins": { 1380 "requires": "nsPlugin" 1381 }, 1382 "setup": [ 1383 "$TC qdisc add dev $DEV1 parent root handle 10: drr", 1384 "$TC class add dev $DEV1 parent root classid 1 drr", 1385 "$TC filter add dev $DEV1 parent 10: handle 1 prio 1 fw classid 10:1 action ok" 1386 ], 1387 "cmdUnderTest": "$TC filter replace dev $DEV1 parent 10: handle 1 prio 1 fw action drop", 1388 "expExitCode": "0", 1389 "verifyCmd": "$TC filter show dev $DEV1 parent 10:", 1390 "matchPattern": "fw chain 0 handle 0x1", 1391 "matchCount": "1", 1392 "teardown": [ 1393 "$TC qdisc del dev $DEV1 parent root drr" 1394 ] 1395 } 1396] 1397