summaryrefslogtreecommitdiffstats
path: root/sys/netinet/in_pcb.c
diff options
context:
space:
mode:
authorae <ae@FreeBSD.org>2014-09-10 12:35:42 +0000
committerae <ae@FreeBSD.org>2014-09-10 12:35:42 +0000
commit82d0b71937338226c447858359bb3ba8b80dc66d (patch)
treed4f3d36026d3cb302475b9a5c8141e345e2db816 /sys/netinet/in_pcb.c
parent7c22eb535c9467c10a29843e419aba0616f23901 (diff)
downloadFreeBSD-src-82d0b71937338226c447858359bb3ba8b80dc66d.zip
FreeBSD-src-82d0b71937338226c447858359bb3ba8b80dc66d.tar.gz
Introduce INP6_PCBHASHKEY macro. Replace usage of hardcoded part of
IPv6 address as hash key in all places. Obtained from: Yandex LLC
Diffstat (limited to 'sys/netinet/in_pcb.c')
-rw-r--r--sys/netinet/in_pcb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c
index 1a5de40..32d2d05 100644
--- a/sys/netinet/in_pcb.c
+++ b/sys/netinet/in_pcb.c
@@ -2046,7 +2046,7 @@ in_pcbinshash_internal(struct inpcb *inp, int do_pcbgroup_update)
#ifdef INET6
if (inp->inp_vflag & INP_IPV6)
- hashkey_faddr = inp->in6p_faddr.s6_addr32[3] /* XXX */;
+ hashkey_faddr = INP6_PCBHASHKEY(&inp->in6p_faddr);
else
#endif
hashkey_faddr = inp->inp_faddr.s_addr;
@@ -2133,7 +2133,7 @@ in_pcbrehash_mbuf(struct inpcb *inp, struct mbuf *m)
#ifdef INET6
if (inp->inp_vflag & INP_IPV6)
- hashkey_faddr = inp->in6p_faddr.s6_addr32[3] /* XXX */;
+ hashkey_faddr = INP6_PCBHASHKEY(&inp->in6p_faddr);
else
#endif
hashkey_faddr = inp->inp_faddr.s_addr;
OpenPOWER on IntegriCloud