summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Ovsienko <denis@ovsienko.info>2023-04-09 11:07:50 +0100
committerDenis Ovsienko <denis@ovsienko.info>2023-04-09 11:20:41 +0100
commit86bed03b4740e542339f45dba70a556bb8433758 (patch)
tree9947a6755deeea952014fdabd9c3133b559b3632
parent0b0686d0d953cb733d0ba664885bbb382f6ac64a (diff)
downloadtcpdump-86bed03b4740e542339f45dba70a556bb8433758.tar.gz
GRE: Refine the WCCP header commit. [skip ci]
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.
-rw-r--r--print-gre.c5
-rw-r--r--tests/wccp_redirect_gre.out3
2 files changed, 4 insertions, 4 deletions
diff --git a/print-gre.c b/print-gre.c
index db6ebfac..a174268e 100644
--- a/print-gre.c
+++ b/print-gre.c
@@ -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;
diff --git a/tests/wccp_redirect_gre.out b/tests/wccp_redirect_gre.out
index 51620b14..b9b65ea1 100644
--- a/tests/wccp_redirect_gre.out
+++ b/tests/wccp_redirect_gre.out
@@ -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