]> The Tcpdump Group git mirrors - tcpdump/commitdiff
GRE: Refine the WCCP header commit. [skip ci]
authorDenis Ovsienko <[email protected]>
Sun, 9 Apr 2023 10:07:50 +0000 (11:07 +0100)
committerDenis Ovsienko <[email protected]>
Sun, 9 Apr 2023 10:20:41 +0000 (11:20 +0100)
Fixup the comment and have the case block actually fall through
consistently with the comment and the OpenBSD implementation.  Update
the test case, which now has the IPv4 packet after the WCCP header.  The
indentation does not represent the header nesting, but the same stands
for the OpenBSD implementation.

print-gre.c
tests/wccp_redirect_gre.out

index db6ebfacaad234ee0f8bbb718b03cc658cd40275..a174268eaf30d73a861f1182070eea64797fd6e1 100644 (file)
@@ -242,13 +242,13 @@ gre_print_0(netdissect_options *ndo, const u_char *bp, u_int length)
                 *
                 * This may either just mean "IPv4" or it may mean
                 * "IPv4 preceded by a WCCP redirect header".  We
-                * check to seeif the first octet looks like the
+                * check to see if the first octet looks like the
                 * beginning of an IPv4 header and, if not, dissect
                 * it "IPv4 preceded by a WCCP redirect header",
                 * otherwise we dissect it as just IPv4.
                 *
                 * See "Packet redirection" in draft-forster-wrec-wccp-v1-00,
-                * scetion 4.12 "Traffic Forwarding" in
+                * section 4.12 "Traffic Forwarding" in
                 * draft-wilson-wrec-wccp-v2-01, and section 3.12.1
                 * "Forwarding using GRE Encapsulation" in
                 * draft-param-wccp-v2rev1-01.
@@ -281,7 +281,6 @@ gre_print_0(netdissect_options *ndo, const u_char *bp, u_int length)
                        printf(": ");
                }
                /* FALLTHROUGH */
-               break;
        case ETHERTYPE_IP:
                ip_print(ndo, bp, len);
                break;
index 51620b1438a0d7dc762a992e126e7775152b9d80..b9b65ea1ec126196e9ed589badc1f96096857867 100644 (file)
@@ -1,3 +1,4 @@
     1  08:50:26.794117 IP (tos 0x0, ttl 253, id 44163, offset 0, flags [none], proto GRE (47), length 268)
     10.254.127.194 > 10.254.214.82: GREv0, Flags [none], length 248
-       wccp T:0 A:0 U:0 SId:89 Alt:0 Pri:72: 
+       wccp T:0 A:0 U:0 SId:89 Alt:0 Pri:72: IP (tos 0x0, ttl 64, id 37140, offset 0, flags [DF], proto TCP (6), length 240)
+    10.254.127.195.1291 > 10.254.108.228.445: Flags [P.], cksum 0x2909 (correct), seq 2206441866:2206442054, ack 1426770077, win 63887, options [nop,nop,TS val 40478 ecr 28035935], length 188