1[ 2 { 3 "id": "319a", 4 "name": "Add pedit action that mangles IP TTL", 5 "category": [ 6 "actions", 7 "pedit" 8 ], 9 "setup": [ 10 [ 11 "$TC actions flush action pedit", 12 0, 13 1, 14 255 15 ] 16 ], 17 "cmdUnderTest": "$TC actions add action pedit ex munge ip ttl set 10", 18 "expExitCode": "0", 19 "verifyCmd": "$TC actions ls action pedit", 20 "matchPattern": "action order [0-9]+: pedit action pass keys 1.*index 1 ref.*key #0 at ipv4\\+8: val 0a000000 mask 00ffffff", 21 "matchCount": "1", 22 "teardown": [ 23 "$TC actions flush action pedit" 24 ] 25 }, 26 { 27 "id": "7e67", 28 "name": "Replace pedit action with invalid goto chain", 29 "category": [ 30 "actions", 31 "pedit" 32 ], 33 "setup": [ 34 [ 35 "$TC actions flush action pedit", 36 0, 37 1, 38 255 39 ], 40 "$TC actions add action pedit ex munge ip ttl set 10 pass index 90" 41 ], 42 "cmdUnderTest": "$TC actions replace action pedit ex munge ip ttl set 10 goto chain 42 index 90 cookie c1a0c1a0", 43 "expExitCode": "255", 44 "verifyCmd": "$TC actions ls action pedit", 45 "matchPattern": "action order [0-9]+: pedit action pass keys 1.*index 90 ref.*key #0 at ipv4\\+8: val 0a000000 mask 00ffffff", 46 "matchCount": "1", 47 "teardown": [ 48 "$TC actions flush action pedit" 49 ] 50 }, 51 { 52 "id": "377e", 53 "name": "Add pedit action with RAW_OP offset u32", 54 "category": [ 55 "actions", 56 "pedit", 57 "raw_op" 58 ], 59 "setup": [ 60 [ 61 "$TC actions flush action pedit", 62 0, 63 1, 64 255 65 ] 66 ], 67 "cmdUnderTest": "$TC actions add action pedit munge offset 12 u32 set 0x90abcdef", 68 "expExitCode": "0", 69 "verifyCmd": "$TC actions list action pedit | grep 'key '", 70 "matchPattern": "12: val 90abcdef mask 00000000", 71 "matchCount": "1", 72 "teardown": [ 73 "$TC actions flush action pedit" 74 ] 75 }, 76 { 77 "id": "a0ca", 78 "name": "Add pedit action with RAW_OP offset u32 (INVALID)", 79 "category": [ 80 "actions", 81 "pedit", 82 "raw_op" 83 ], 84 "setup": [ 85 [ 86 "$TC actions flush action pedit", 87 0, 88 1, 89 255 90 ] 91 ], 92 "cmdUnderTest": "$TC actions add action pedit munge offset 2 u32 set 0x12345678", 93 "expExitCode": "255", 94 "verifyCmd": "/bin/true", 95 "matchPattern": " ", 96 "matchCount": "0", 97 "teardown": [ 98 "$TC actions flush action pedit" 99 ] 100 }, 101 { 102 "id": "dd8a", 103 "name": "Add pedit action with RAW_OP offset u16 u16", 104 "category": [ 105 "actions", 106 "pedit", 107 "raw_op" 108 ], 109 "setup": [ 110 [ 111 "$TC actions flush action pedit", 112 0, 113 1, 114 255 115 ] 116 ], 117 "cmdUnderTest": "$TC actions add action pedit munge offset 12 u16 set 0x1234 munge offset 14 u16 set 0x5678", 118 "expExitCode": "0", 119 "verifyCmd": "$TC actions list action pedit | grep 'key '", 120 "matchPattern": "val 12340000 mask 0000ffff.*val 00005678 mask ffff0000", 121 "matchCount": "1", 122 "teardown": [ 123 "$TC actions flush action pedit" 124 ] 125 }, 126 { 127 "id": "53db", 128 "name": "Add pedit action with RAW_OP offset u16 (INVALID)", 129 "category": [ 130 "actions", 131 "pedit", 132 "raw_op" 133 ], 134 "setup": [ 135 [ 136 "$TC actions flush action pedit", 137 0, 138 1, 139 255 140 ] 141 ], 142 "cmdUnderTest": "$TC actions add action pedit munge offset 15 u16 set 0x1234", 143 "expExitCode": "255", 144 "verifyCmd": "/bin/true", 145 "matchPattern": " ", 146 "matchCount": "0", 147 "teardown": [ 148 "$TC actions flush action pedit" 149 ] 150 }, 151 { 152 "id": "5c7e", 153 "name": "Add pedit action with RAW_OP offset u8 add value", 154 "category": [ 155 "actions", 156 "pedit", 157 "raw_op" 158 ], 159 "setup": [ 160 [ 161 "$TC actions flush action pedit", 162 0, 163 1, 164 255 165 ] 166 ], 167 "cmdUnderTest": "$TC actions add action pedit ex munge offset 16 u8 add 0xf", 168 "expExitCode": "0", 169 "verifyCmd": "$TC actions list action pedit | grep 'key '", 170 "matchPattern": " 16: add 0f000000 mask 00ffffff", 171 "matchCount": "1", 172 "teardown": [ 173 "$TC actions flush action pedit" 174 ] 175 }, 176 { 177 "id": "2893", 178 "name": "Add pedit action with RAW_OP offset u8 quad", 179 "category": [ 180 "actions", 181 "pedit", 182 "raw_op" 183 ], 184 "setup": [ 185 [ 186 "$TC actions flush action pedit", 187 0, 188 1, 189 255 190 ] 191 ], 192 "cmdUnderTest": "$TC actions add action pedit munge offset 12 u8 set 0x12 munge offset 13 u8 set 0x34 munge offset 14 u8 set 0x56 munge offset 15 u8 set 0x78", 193 "expExitCode": "0", 194 "verifyCmd": "$TC actions list action pedit | grep 'key '", 195 "matchPattern": "val 12000000 mask 00ffffff.*val 00340000 mask ff00ffff.*val 00005600 mask ffff00ff.*val 00000078 mask ffffff00", 196 "matchCount": "1", 197 "teardown": [ 198 "$TC actions flush action pedit" 199 ] 200 }, 201 { 202 "id": "3a07", 203 "name": "Add pedit action with RAW_OP offset u8-u16-u8", 204 "category": [ 205 "actions", 206 "pedit", 207 "raw_op" 208 ], 209 "setup": [ 210 [ 211 "$TC actions flush action pedit", 212 0, 213 1, 214 255 215 ] 216 ], 217 "cmdUnderTest": "$TC actions add action pedit munge offset 0 u8 set 0x12 munge offset 1 u16 set 0x3456 munge offset 3 u8 set 0x78", 218 "expExitCode": "0", 219 "verifyCmd": "$TC actions list action pedit | grep 'key '", 220 "matchPattern": "val 12000000 mask 00ffffff.*val 00345600 mask ff0000ff.*val 00000078 mask ffffff00", 221 "matchCount": "1", 222 "teardown": [ 223 "$TC actions flush action pedit" 224 ] 225 }, 226 { 227 "id": "ab0f", 228 "name": "Add pedit action with RAW_OP offset u16-u8-u8", 229 "category": [ 230 "actions", 231 "pedit", 232 "raw_op" 233 ], 234 "setup": [ 235 [ 236 "$TC actions flush action pedit", 237 0, 238 1, 239 255 240 ] 241 ], 242 "cmdUnderTest": "$TC actions add action pedit munge offset 0 u16 set 0x1234 munge offset 2 u8 set 0x56 munge offset 3 u8 set 0x78", 243 "expExitCode": "0", 244 "verifyCmd": "$TC actions list action pedit | grep 'key '", 245 "matchPattern": "val 12340000 mask 0000ffff.*val 00005600 mask ffff00ff.*val 00000078 mask ffffff00", 246 "matchCount": "1", 247 "teardown": [ 248 "$TC actions flush action pedit" 249 ] 250 }, 251 { 252 "id": "9d12", 253 "name": "Add pedit action with RAW_OP offset u32 set u16 clear u8 invert", 254 "category": [ 255 "actions", 256 "pedit", 257 "raw_op" 258 ], 259 "setup": [ 260 [ 261 "$TC actions flush action pedit", 262 0, 263 1, 264 255 265 ] 266 ], 267 "cmdUnderTest": "$TC actions add action pedit munge offset 0 u32 set 0x12345678 munge offset 1 u16 clear munge offset 2 u8 invert", 268 "expExitCode": "0", 269 "verifyCmd": "$TC actions list action pedit | grep 'key '", 270 "matchPattern": "val 12345678 mask 00000000.*val 00000000 mask ff0000ff.*val 0000ff00 mask ffffffff", 271 "matchCount": "1", 272 "teardown": [ 273 "$TC actions flush action pedit" 274 ] 275 }, 276 { 277 "id": "ebfa", 278 "name": "Add pedit action with RAW_OP offset overflow u32 (INVALID)", 279 "category": [ 280 "actions", 281 "pedit", 282 "raw_op" 283 ], 284 "setup": [ 285 [ 286 "$TC actions flush action pedit", 287 0, 288 1, 289 255 290 ] 291 ], 292 "cmdUnderTest": "$TC actions add action pedit munge offset 0xffffffffffffffffffffffffffffffffffffffffff u32 set 0x1", 293 "expExitCode": "255", 294 "verifyCmd": "/bin/true", 295 "matchPattern": " ", 296 "matchCount": "0", 297 "teardown": [ 298 "$TC actions flush action pedit" 299 ] 300 }, 301 { 302 "id": "f512", 303 "name": "Add pedit action with RAW_OP offset u16 at offmask shift set", 304 "category": [ 305 "actions", 306 "pedit", 307 "raw_op" 308 ], 309 "setup": [ 310 [ 311 "$TC actions flush action pedit", 312 0, 313 1, 314 255 315 ] 316 ], 317 "cmdUnderTest": "$TC actions add action pedit munge offset 12 u16 at 12 ffff 1 set 0xaaaa", 318 "expExitCode": "0", 319 "verifyCmd": "$TC actions list action pedit | grep 'key '", 320 "matchPattern": " 12: val aaaa0000 mask 0000ffff", 321 "matchCount": "1", 322 "teardown": [ 323 "$TC actions flush action pedit" 324 ] 325 }, 326 { 327 "id": "c2cb", 328 "name": "Add pedit action with RAW_OP offset u32 retain value", 329 "category": [ 330 "actions", 331 "pedit", 332 "raw_op" 333 ], 334 "setup": [ 335 [ 336 "$TC actions flush action pedit", 337 0, 338 1, 339 255 340 ] 341 ], 342 "cmdUnderTest": "$TC actions add action pedit munge offset 12 u32 set 0x12345678 retain 0xff00", 343 "expExitCode": "0", 344 "verifyCmd": "$TC actions list action pedit | grep 'key '", 345 "matchPattern": " 12: val 00005600 mask ffff00ff", 346 "matchCount": "1", 347 "teardown": [ 348 "$TC actions flush action pedit" 349 ] 350 }, 351 { 352 "id": "86d4", 353 "name": "Add pedit action with LAYERED_OP eth set src & dst", 354 "category": [ 355 "actions", 356 "pedit", 357 "layered_op" 358 ], 359 "setup": [ 360 [ 361 "$TC actions flush action pedit", 362 0, 363 1, 364 255 365 ] 366 ], 367 "cmdUnderTest": "$TC actions add action pedit ex munge eth src set 11:22:33:44:55:66 munge eth dst set ff:ee:dd:cc:bb:aa", 368 "expExitCode": "0", 369 "verifyCmd": "$TC actions list action pedit | grep 'key '", 370 "matchPattern": "eth\\+4: val 00001122 mask ffff0000.*eth\\+8: val 33445566 mask 00000000.*eth\\+0: val ffeeddcc mask 00000000.*eth\\+4: val bbaa0000 mask 0000ffff", 371 "matchCount": "1", 372 "teardown": [ 373 "$TC actions flush action pedit" 374 ] 375 }, 376 { 377 "id": "c715", 378 "name": "Add pedit action with LAYERED_OP eth set src (INVALID)", 379 "category": [ 380 "actions", 381 "pedit", 382 "layered_op" 383 ], 384 "setup": [ 385 [ 386 "$TC actions flush action pedit", 387 0, 388 1, 389 255 390 ] 391 ], 392 "cmdUnderTest": "$TC actions add action pedit ex munge eth src set %e:11:m2:33:x4:-5", 393 "expExitCode": "255", 394 "verifyCmd": "/bin/true", 395 "matchPattern": " ", 396 "matchCount": "0", 397 "teardown": [ 398 "$TC actions flush action pedit" 399 ] 400 }, 401 { 402 "id": "ba22", 403 "name": "Add pedit action with LAYERED_OP eth type set/clear sequence", 404 "category": [ 405 "actions", 406 "pedit", 407 "layered_op" 408 ], 409 "setup": [ 410 [ 411 "$TC actions flush action pedit", 412 0, 413 1, 414 255 415 ] 416 ], 417 "cmdUnderTest": "$TC actions add action pedit ex munge eth type set 0x1 munge eth type clear munge eth type set 0x1 munge eth type clear munge eth type set 0x1 munge eth type clear munge eth type set 0x1 munge eth type clear munge eth type set 0x1 munge eth type clear munge eth type set 0x1 munge eth type clear", 418 "expExitCode": "0", 419 "verifyCmd": "$TC actions list action pedit | grep 'key '", 420 "matchPattern": "eth\\+12: val 00010000 mask 0000ffff.*eth\\+12: val 00000000 mask 0000ffff.*eth\\+12: val 00010000 mask 0000ffff.*eth\\+12: val 00000000 mask 0000ffff.*eth\\+12: val 00010000 mask 0000ffff.*eth\\+12: val 00000000 mask 0000ffff.*eth\\+12: val 00010000 mask 0000ffff.*eth\\+12: val 00000000 mask 0000ffff.*eth\\+12: val 00010000 mask 0000ffff.*eth\\+12: val 00000000 mask 0000ffff.*eth\\+12: val 00010000 mask 0000ffff.*eth\\+12: val 00000000 mask 0000ffff", 421 "matchCount": "1", 422 "teardown": [ 423 "$TC actions flush action pedit" 424 ] 425 }, 426 { 427 "id": "5810", 428 "name": "Add pedit action with LAYERED_OP ip set src & dst", 429 "category": [ 430 "actions", 431 "pedit", 432 "layered_op" 433 ], 434 "setup": [ 435 [ 436 "$TC actions flush action pedit", 437 0, 438 1, 439 255 440 ] 441 ], 442 "cmdUnderTest": "$TC actions add action pedit munge ip src set 18.52.86.120 munge ip dst set 18.52.86.120", 443 "expExitCode": "0", 444 "verifyCmd": "$TC actions list action pedit | grep 'key '", 445 "matchPattern": " 12: val 12345678 mask 00000000.* 16: val 12345678 mask 00000000", 446 "matchCount": "1", 447 "teardown": [ 448 "$TC actions flush action pedit" 449 ] 450 }, 451 { 452 "id": "1092", 453 "name": "Add pedit action with LAYERED_OP ip set ihl & dsfield", 454 "category": [ 455 "actions", 456 "pedit", 457 "layered_op" 458 ], 459 "setup": [ 460 [ 461 "$TC actions flush action pedit", 462 0, 463 1, 464 255 465 ] 466 ], 467 "cmdUnderTest": "$TC actions add action pedit munge ip ihl set 0xff munge ip dsfield set 0xff", 468 "expExitCode": "0", 469 "verifyCmd": "$TC actions list action pedit | grep 'key '", 470 "matchPattern": " 0: val 0f000000 mask f0ffffff.* 0: val 00ff0000 mask ff00ffff", 471 "matchCount": "1", 472 "teardown": [ 473 "$TC actions flush action pedit" 474 ] 475 }, 476 { 477 "id": "02d8", 478 "name": "Add pedit action with LAYERED_OP ip set ttl & protocol", 479 "category": [ 480 "actions", 481 "pedit", 482 "layered_op" 483 ], 484 "setup": [ 485 [ 486 "$TC actions flush action pedit", 487 0, 488 1, 489 255 490 ] 491 ], 492 "cmdUnderTest": "$TC actions add action pedit munge ip ttl set 0x1 munge ip protocol set 0xff", 493 "expExitCode": "0", 494 "verifyCmd": "$TC actions list action pedit | grep 'key '", 495 "matchPattern": " 8: val 01000000 mask 00ffffff.* 8: val 00ff0000 mask ff00ffff", 496 "matchCount": "1", 497 "teardown": [ 498 "$TC actions flush action pedit" 499 ] 500 }, 501 { 502 "id": "3e2d", 503 "name": "Add pedit action with LAYERED_OP ip set ttl (INVALID)", 504 "category": [ 505 "actions", 506 "pedit", 507 "layered_op" 508 ], 509 "setup": [ 510 [ 511 "$TC actions flush action pedit", 512 0, 513 1, 514 255 515 ] 516 ], 517 "cmdUnderTest": "$TC actions add action pedit munge ip ttl set 300", 518 "expExitCode": "255", 519 "verifyCmd": "/bin/true", 520 "matchPattern": " ", 521 "matchCount": "0", 522 "teardown": [ 523 "$TC actions flush action pedit" 524 ] 525 }, 526 { 527 "id": "31ae", 528 "name": "Add pedit action with LAYERED_OP ip ttl clear/set", 529 "category": [ 530 "actions", 531 "pedit", 532 "layered_op" 533 ], 534 "setup": [ 535 [ 536 "$TC actions flush action pedit", 537 0, 538 1, 539 255 540 ] 541 ], 542 "cmdUnderTest": "$TC actions add action pedit munge ip ttl clear munge ip ttl set 0x1", 543 "expExitCode": "0", 544 "verifyCmd": "$TC actions list action pedit | grep 'key '", 545 "matchPattern": " 8: val 00000000 mask 00ffffff.* 8: val 01000000 mask 00ffffff", 546 "matchCount": "1", 547 "teardown": [ 548 "$TC actions flush action pedit" 549 ] 550 }, 551 { 552 "id": "486f", 553 "name": "Add pedit action with LAYERED_OP ip set duplicate fields", 554 "category": [ 555 "actions", 556 "pedit", 557 "layered_op" 558 ], 559 "setup": [ 560 [ 561 "$TC actions flush action pedit", 562 0, 563 1, 564 255 565 ] 566 ], 567 "cmdUnderTest": "$TC actions add action pedit munge ip ttl set 0x1 munge ip ttl set 0x1", 568 "expExitCode": "0", 569 "verifyCmd": "$TC actions list action pedit | grep 'key '", 570 "matchPattern": " 8: val 01000000 mask 00ffffff.* 8: val 01000000 mask 00ffffff", 571 "matchCount": "1", 572 "teardown": [ 573 "$TC actions flush action pedit" 574 ] 575 }, 576 { 577 "id": "e790", 578 "name": "Add pedit action with LAYERED_OP ip set ce, df, mf, firstfrag, nofrag fields", 579 "category": [ 580 "actions", 581 "pedit", 582 "layered_op" 583 ], 584 "setup": [ 585 [ 586 "$TC actions flush action pedit", 587 0, 588 1, 589 255 590 ] 591 ], 592 "cmdUnderTest": "$TC actions add action pedit munge ip ce set 0xff munge ip df set 0xff munge ip mf set 0xff munge ip firstfrag set 0xff munge ip nofrag set 0xff", 593 "expExitCode": "0", 594 "verifyCmd": "$TC actions list action pedit | grep 'key '", 595 "matchPattern": " 4: val 00008000 mask ffff7fff.* 4: val 00004000 mask ffffbfff.* 4: val 00002000 mask ffffdfff.* 4: val 00001f00 mask ffffe0ff.* 4: val 00003f00 mask ffffc0ff", 596 "matchCount": "1", 597 "teardown": [ 598 "$TC actions flush action pedit" 599 ] 600 }, 601 { 602 "id": "6829", 603 "name": "Add pedit action with LAYERED_OP beyond ip set dport & sport", 604 "category": [ 605 "actions", 606 "pedit", 607 "layered_op" 608 ], 609 "setup": [ 610 [ 611 "$TC actions flush action pedit", 612 0, 613 1, 614 255 615 ] 616 ], 617 "cmdUnderTest": "$TC actions add action pedit munge ip dport set 0x1234 munge ip sport set 0x5678", 618 "expExitCode": "0", 619 "verifyCmd": "$TC actions list action pedit | grep 'key '", 620 "matchPattern": " 20: val 00001234 mask ffff0000.* 20: val 56780000 mask 0000ffff", 621 "matchCount": "1", 622 "teardown": [ 623 "$TC actions flush action pedit" 624 ] 625 }, 626 { 627 "id": "afd8", 628 "name": "Add pedit action with LAYERED_OP beyond ip set icmp_type & icmp_code", 629 "category": [ 630 "actions", 631 "pedit", 632 "layered_op" 633 ], 634 "setup": [ 635 [ 636 "$TC actions flush action pedit", 637 0, 638 1, 639 255 640 ] 641 ], 642 "cmdUnderTest": "$TC actions add action pedit munge ip icmp_type set 0xff munge ip icmp_code set 0xff", 643 "expExitCode": "0", 644 "verifyCmd": "$TC actions list action pedit | grep 'key '", 645 "matchPattern": " 20: val ff000000 mask 00ffffff.* 20: val ff000000 mask 00ffffff", 646 "matchCount": "1", 647 "teardown": [ 648 "$TC actions flush action pedit" 649 ] 650 }, 651 { 652 "id": "3143", 653 "name": "Add pedit action with LAYERED_OP beyond ip set dport (INVALID)", 654 "category": [ 655 "actions", 656 "pedit", 657 "layered_op" 658 ], 659 "setup": [ 660 [ 661 "$TC actions flush action pedit", 662 0, 663 1, 664 255 665 ] 666 ], 667 "cmdUnderTest": "$TC actions add action pedit ex munge ip dport set 0x1234", 668 "expExitCode": "255", 669 "verifyCmd": "/bin/true", 670 "matchPattern": " ", 671 "matchCount": "0", 672 "teardown": [ 673 "$TC actions flush action pedit" 674 ] 675 }, 676 { 677 "id": "fc1f", 678 "name": "Add pedit action with LAYERED_OP ip6 set src & dst", 679 "category": [ 680 "actions", 681 "pedit", 682 "layered_op" 683 ], 684 "setup": [ 685 [ 686 "$TC actions flush action pedit", 687 0, 688 1, 689 255 690 ] 691 ], 692 "cmdUnderTest": "$TC actions add action pedit ex munge ip6 src set 2001:0db8:0:f101::1 munge ip6 dst set 2001:0db8:0:f101::1", 693 "expExitCode": "0", 694 "verifyCmd": "$TC actions list action pedit | grep 'key '", 695 "matchPattern": "ipv6\\+8: val 20010db8 mask 00000000.*ipv6\\+12: val 0000f101 mask 00000000.*ipv6\\+16: val 00000000 mask 00000000.*ipv6\\+20: val 00000001 mask 00000000.*ipv6\\+24: val 20010db8 mask 00000000.*ipv6\\+28: val 0000f101 mask 00000000.*ipv6\\+32: val 00000000 mask 00000000.*ipv6\\+36: val 00000001 mask 00000000", 696 "matchCount": "1", 697 "teardown": [ 698 "$TC actions flush action pedit" 699 ] 700 }, 701 { 702 "id": "6d34", 703 "name": "Add pedit action with LAYERED_OP ip6 dst retain value (INVALID)", 704 "category": [ 705 "actions", 706 "pedit", 707 "layered_op" 708 ], 709 "setup": [ 710 [ 711 "$TC actions flush action pedit", 712 0, 713 1, 714 255 715 ] 716 ], 717 "cmdUnderTest": "$TC actions add action pedit ex munge ip6 dst set 2001:0db8:0:f101::1 retain 0xff0000", 718 "expExitCode": "255", 719 "verifyCmd": "/bin/true", 720 "matchPattern": " ", 721 "matchCount": "0", 722 "teardown": [ 723 "$TC actions flush action pedit" 724 ] 725 }, 726 { 727 "id": "6f5e", 728 "name": "Add pedit action with LAYERED_OP ip6 flow_lbl", 729 "category": [ 730 "actions", 731 "pedit", 732 "layered_op" 733 ], 734 "setup": [ 735 [ 736 "$TC actions flush action pedit", 737 0, 738 1, 739 255 740 ] 741 ], 742 "cmdUnderTest": "$TC actions add action pedit ex munge ip6 flow_lbl set 0xfffff", 743 "expExitCode": "0", 744 "verifyCmd": "$TC actions list action pedit | grep 'key '", 745 "matchPattern": "ipv6\\+0: val 0007ffff mask fff80000", 746 "matchCount": "1", 747 "teardown": [ 748 "$TC actions flush action pedit" 749 ] 750 }, 751 { 752 "id": "6795", 753 "name": "Add pedit action with LAYERED_OP ip6 set payload_len, nexthdr, hoplimit", 754 "category": [ 755 "actions", 756 "pedit", 757 "layered_op" 758 ], 759 "setup": [ 760 [ 761 "$TC actions flush action pedit", 762 0, 763 1, 764 255 765 ] 766 ], 767 "cmdUnderTest": "$TC actions add action pedit ex munge ip6 payload_len set 0xffff munge ip6 nexthdr set 0xff munge ip6 hoplimit set 0xff", 768 "expExitCode": "0", 769 "verifyCmd": "$TC actions list action pedit | grep 'key '", 770 "matchPattern": "ipv6\\+4: val ffff0000 mask 0000ffff.*ipv6\\+4: val 0000ff00 mask ffff00ff.*ipv6\\+4: val 000000ff mask ffffff00", 771 "matchCount": "1", 772 "teardown": [ 773 "$TC actions flush action pedit" 774 ] 775 }, 776 { 777 "id": "1442", 778 "name": "Add pedit action with LAYERED_OP tcp set dport & sport", 779 "category": [ 780 "actions", 781 "pedit", 782 "layered_op" 783 ], 784 "setup": [ 785 [ 786 "$TC actions flush action pedit", 787 0, 788 1, 789 255 790 ] 791 ], 792 "cmdUnderTest": "$TC actions add action pedit ex munge tcp dport set 4789 munge tcp sport set 1", 793 "expExitCode": "0", 794 "verifyCmd": "$TC actions list action pedit | grep 'key '", 795 "matchPattern": "tcp\\+0: val 000012b5 mask ffff0000.*tcp\\+0: val 00010000 mask 0000ffff", 796 "matchCount": "1", 797 "teardown": [ 798 "$TC actions flush action pedit" 799 ] 800 }, 801 { 802 "id": "b7ac", 803 "name": "Add pedit action with LAYERED_OP tcp sport set (INVALID)", 804 "category": [ 805 "actions", 806 "pedit", 807 "layered_op" 808 ], 809 "setup": [ 810 [ 811 "$TC actions flush action pedit", 812 0, 813 1, 814 255 815 ] 816 ], 817 "cmdUnderTest": "$TC actions add action pedit ex munge tcp sport set -200", 818 "expExitCode": "255", 819 "verifyCmd": "/bin/true", 820 "matchPattern": " ", 821 "matchCount": "0", 822 "teardown": [ 823 "$TC actions flush action pedit" 824 ] 825 }, 826 { 827 "id": "cfcc", 828 "name": "Add pedit action with LAYERED_OP tcp flags set", 829 "category": [ 830 "actions", 831 "pedit", 832 "layered_op" 833 ], 834 "setup": [ 835 [ 836 "$TC actions flush action pedit", 837 0, 838 1, 839 255 840 ] 841 ], 842 "cmdUnderTest": "$TC actions add action pedit ex munge tcp flags set 0x16", 843 "expExitCode": "0", 844 "verifyCmd": "$TC actions list action pedit | grep 'key '", 845 "matchPattern": "tcp\\+12: val 00160000 mask ff00ffff", 846 "matchCount": "1", 847 "teardown": [ 848 "$TC actions flush action pedit" 849 ] 850 }, 851 { 852 "id": "3bc4", 853 "name": "Add pedit action with LAYERED_OP tcp set dport, sport & flags fields", 854 "category": [ 855 "actions", 856 "pedit", 857 "layered_op" 858 ], 859 "setup": [ 860 [ 861 "$TC actions flush action pedit", 862 0, 863 1, 864 255 865 ] 866 ], 867 "cmdUnderTest": "$TC actions add action pedit ex munge tcp dport set 4789 munge tcp sport set 1 munge tcp flags set 0x1", 868 "expExitCode": "0", 869 "verifyCmd": "$TC actions list action pedit | grep 'key '", 870 "matchPattern": "tcp\\+0: val 000012b5 mask ffff0000.*tcp\\+0: val 00010000 mask 0000ffff.*tcp\\+12: val 00010000 mask ff00ffff", 871 "matchCount": "1", 872 "teardown": [ 873 "$TC actions flush action pedit" 874 ] 875 }, 876 { 877 "id": "f1c8", 878 "name": "Add pedit action with LAYERED_OP udp set dport & sport", 879 "category": [ 880 "actions", 881 "pedit", 882 "layered_op" 883 ], 884 "setup": [ 885 [ 886 "$TC actions flush action pedit", 887 0, 888 1, 889 255 890 ] 891 ], 892 "cmdUnderTest": "$TC actions add action pedit ex munge udp dport set 4789 munge udp sport set 4789", 893 "expExitCode": "0", 894 "verifyCmd": "$TC actions list action pedit | grep 'key '", 895 "matchPattern": "udp\\+0: val 000012b5 mask ffff0000.*udp\\+0: val 12b50000 mask 0000ffff", 896 "matchCount": "1", 897 "teardown": [ 898 "$TC actions flush action pedit" 899 ] 900 }, 901 { 902 "id": "d784", 903 "name": "Add pedit action with mixed RAW/LAYERED_OP #1", 904 "category": [ 905 "actions", 906 "pedit", 907 "layered_op", 908 "raw_op" 909 ], 910 "setup": [ 911 [ 912 "$TC actions flush action pedit", 913 0, 914 1, 915 255 916 ] 917 ], 918 "cmdUnderTest": "$TC actions add action pedit ex munge eth src set 11:22:33:44:55:66 munge ip ttl set 0xff munge tcp flags clear munge offset 15 u8 add 40 retain 0xf0 munge udp dport add 1", 919 "expExitCode": "0", 920 "verifyCmd": "$TC actions list action pedit | grep 'key '", 921 "matchPattern": "eth\\+4: val 00001122 mask ffff0000.*eth\\+8: val 33445566 mask 00000000.*ipv4\\+8: val ff000000 mask 00ffffff.*tcp\\+12: val 00000000 mask ff00ffff.* 12: add 00000020 mask ffffff0f.*udp\\+0: add 00000001 mask ffff0000", 922 "matchCount": "1", 923 "teardown": [ 924 "$TC actions flush action pedit" 925 ] 926 }, 927 { 928 "id": "70ca", 929 "name": "Add pedit action with mixed RAW/LAYERED_OP #2", 930 "category": [ 931 "actions", 932 "pedit", 933 "layered_op", 934 "raw_op" 935 ], 936 "setup": [ 937 [ 938 "$TC actions flush action pedit", 939 0, 940 1, 941 255 942 ] 943 ], 944 "cmdUnderTest": "$TC actions add action pedit ex munge eth src set 11:22:33:44:55:66 munge eth dst set ff:ee:dd:cc:bb:aa munge ip6 payload_len set 0xffff munge ip6 nexthdr set 0xff munge ip6 hoplimit preserve munge offset 0 u8 set 0x12 munge offset 1 u16 set 0x3456 munge offset 3 u8 set 0x78 munge ip ttl set 0xaa munge ip protocol set 0xff", 945 "expExitCode": "0", 946 "verifyCmd": "$TC actions list action pedit | grep 'key '", 947 "matchPattern": "eth\\+4: val 00001122 mask ffff0000.*eth\\+8: val 33445566 mask 00000000.*eth\\+0: val ffeeddcc mask 00000000.*eth\\+4: val bbaa0000 mask 0000ffff.*ipv6\\+4: val ffff0000 mask 0000ffff.*ipv6\\+4: val 0000ff00 mask ffff00ff.*ipv6\\+4: val 00000000 mask ffffffff.* 0: val 12000000 mask 00ffffff.* 0: val 00345600 mask ff0000ff.* 0: val 00000078 mask ffffff00.*ipv4\\+8: val aa000000 mask 00ffffff.*ipv4\\+8: val 00ff0000 mask ff00ffff", 948 "matchCount": "1", 949 "teardown": [ 950 "$TC actions flush action pedit" 951 ] 952 } 953 954] 955