diff options
author | 2016-01-21 11:23:48 +0000 | |
---|---|---|
committer | 2016-01-21 11:23:48 +0000 | |
commit | 34dbf6d68f3cdb81bf9e00e1703c751f2deb0bb7 (patch) | |
tree | e5af64c9c5f1adad00933426db4d4893c7ff84e6 /sys/netinet6/ip6_input.c | |
parent | avoid uninitialised variable use (diff) | |
download | wireguard-openbsd-34dbf6d68f3cdb81bf9e00e1703c751f2deb0bb7.tar.xz wireguard-openbsd-34dbf6d68f3cdb81bf9e00e1703c751f2deb0bb7.zip |
Introduce in{,6}_hasmulti(), two functions to check in the hot path if
an interface joined a specific multicast group.
ok phessler@, visa@, dlg@
Diffstat (limited to 'sys/netinet6/ip6_input.c')
-rw-r--r-- | sys/netinet6/ip6_input.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/netinet6/ip6_input.c b/sys/netinet6/ip6_input.c index 7656b09f8af..b9375930b01 100644 --- a/sys/netinet6/ip6_input.c +++ b/sys/netinet6/ip6_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip6_input.c,v 1.153 2016/01/06 10:02:42 sthen Exp $ */ +/* $OpenBSD: ip6_input.c,v 1.154 2016/01/21 11:23:48 mpi Exp $ */ /* $KAME: ip6_input.c,v 1.188 2001/03/29 05:34:31 itojun Exp $ */ /* @@ -388,7 +388,6 @@ ip6_input(struct mbuf *m) * Multicast check */ if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) { - struct in6_multi *in6m = NULL; /* * Make sure M_MCAST is set. It should theoretically @@ -401,8 +400,7 @@ ip6_input(struct mbuf *m) * See if we belong to the destination multicast group on the * arrival interface. */ - IN6_LOOKUP_MULTI(ip6->ip6_dst, ifp, in6m); - if (in6m) + if (in6_hasmulti(&ip6->ip6_dst, ifp)) ours = 1; #ifdef MROUTING else if (!ip6_mforwarding || !ip6_mrouter) |