diff options
author | Guy Harris <guy@alum.mit.edu> | 2016-02-12 20:26:39 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2016-02-12 20:26:39 -0800 |
commit | 83b356e177deb463d4b00917303947b4ab713be2 (patch) | |
tree | 1520185e3c7530880204dde589ad0e8ca6f93209 /ip6.h | |
parent | 63d0029e2736ba0e965d5f8ac6f22aa77002e1bc (diff) | |
download | tcpdump-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.h | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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_ */ |