summaryrefslogtreecommitdiff
path: root/ip6.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2016-02-12 20:26:39 -0800
committerGuy Harris <guy@alum.mit.edu>2016-02-12 20:26:39 -0800
commit83b356e177deb463d4b00917303947b4ab713be2 (patch)
tree1520185e3c7530880204dde589ad0e8ca6f93209 /ip6.h
parent63d0029e2736ba0e965d5f8ac6f22aa77002e1bc (diff)
downloadtcpdump-83b356e177deb463d4b00917303947b4ab713be2.tar.gz
Don't overwrite the destination IPv6 address for routing headers.
If we have a routing header, instead of overwriting the packet's IPv6 destination address in the packet with the final destination, so that the next protocol's checksum routine can use it, we do as we do for IPv4, and, in the "next protocol checksum" routine, scan the headers looking for a routing header and, if we find one, copy the final destination from it. While we're at it, clean up a few things.
Diffstat (limited to 'ip6.h')
-rw-r--r--ip6.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/ip6.h b/ip6.h
index 1ad91498..2ea1d0ab 100644
--- a/ip6.h
+++ b/ip6.h
@@ -172,7 +172,11 @@ struct ip6_rthdr {
/* followed by routing type specific data */
} UNALIGNED;
+#define IPV6_RTHDR_TYPE_0 0
+#define IPV6_RTHDR_TYPE_2 2
+
/* Type 0 Routing header */
+/* Also used for Type 2 */
struct ip6_rthdr0 {
uint8_t ip6r0_nxt; /* next header */
uint8_t ip6r0_len; /* length in units of 8 octets */
@@ -195,7 +199,4 @@ struct ip6_frag {
#define IP6F_RESERVED_MASK 0x0006 /* reserved bits in ip6f_offlg */
#define IP6F_MORE_FRAG 0x0001 /* more-fragments flag */
-/* in print-ip6.c */
-extern int nextproto6_cksum(const struct ip6_hdr *, const uint8_t *, u_int, u_int, u_int);
-
#endif /* not _NETINET_IP6_H_ */