summaryrefslogtreecommitdiffstats
path: root/sys/netinet6/in6_cksum.c
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2003-10-08 18:26:08 +0000
committerume <ume@FreeBSD.org>2003-10-08 18:26:08 +0000
commitcb2c1545ab3b25d366aeb88623dd50ed9349e174 (patch)
tree0e57d38335c69eed019dcea1730b3cd22ff6025e /sys/netinet6/in6_cksum.c
parent8f2de8390a373f0018eb9a8bb4cab9e630163357 (diff)
downloadFreeBSD-src-cb2c1545ab3b25d366aeb88623dd50ed9349e174.zip
FreeBSD-src-cb2c1545ab3b25d366aeb88623dd50ed9349e174.tar.gz
- fix typo in comments.
- style. - NULL is not 0. - some variables were renamed. - nuke unused logic. (there is no functional change.) Obtained from: KAME
Diffstat (limited to 'sys/netinet6/in6_cksum.c')
-rw-r--r--sys/netinet6/in6_cksum.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/sys/netinet6/in6_cksum.c b/sys/netinet6/in6_cksum.c
index 049c60d..17256e2 100644
--- a/sys/netinet6/in6_cksum.c
+++ b/sys/netinet6/in6_cksum.c
@@ -100,9 +100,6 @@ in6_cksum(m, nxt, off, len)
int sum = 0;
int mlen = 0;
int byte_swapped = 0;
-#if 0
- int srcifid = 0, dstifid = 0;
-#endif
struct ip6_hdr *ip6;
union {
u_int16_t phs[4];
@@ -133,16 +130,6 @@ in6_cksum(m, nxt, off, len)
* First create IP6 pseudo header and calculate a summary.
*/
ip6 = mtod(m, struct ip6_hdr *);
-#if 0
- if (IN6_IS_SCOPE_LINKLOCAL(&ip6->ip6_src)) {
- srcifid = ip6->ip6_src.s6_addr16[1];
- ip6->ip6_src.s6_addr16[1] = 0;
- }
- if (IN6_IS_SCOPE_LINKLOCAL(&ip6->ip6_dst)) {
- dstifid = ip6->ip6_dst.s6_addr16[1];
- ip6->ip6_dst.s6_addr16[1] = 0;
- }
-#endif
w = (u_int16_t *)&ip6->ip6_src;
uph.ph.ph_len = htonl(len);
uph.ph.ph_nxt = nxt;
@@ -163,12 +150,6 @@ in6_cksum(m, nxt, off, len)
sum += uph.phs[0]; sum += uph.phs[1];
sum += uph.phs[2]; sum += uph.phs[3];
-#if 0
- if (srcifid)
- ip6->ip6_src.s6_addr16[1] = srcifid;
- if (dstifid)
- ip6->ip6_dst.s6_addr16[1] = dstifid;
-#endif
/*
* Secondly calculate a summary of the first mbuf excluding offset.
*/
OpenPOWER on IntegriCloud