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_mroute.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_mroute.c')
-rw-r--r-- | sys/netinet6/ip6_mroute.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/netinet6/ip6_mroute.c b/sys/netinet6/ip6_mroute.c index 0d8370165aa..51d504c15d7 100644 --- a/sys/netinet6/ip6_mroute.c +++ b/sys/netinet6/ip6_mroute.c @@ -1372,7 +1372,6 @@ phyint_send6(struct ip6_hdr *ip6, struct mif6 *mifp, struct mbuf *m) int error = 0; int s = splsoftnet(); static struct route_in6 ro; - struct in6_multi *in6m; struct sockaddr_in6 *dst6; /* @@ -1416,8 +1415,7 @@ phyint_send6(struct ip6_hdr *ip6, struct mif6 *mifp, struct mbuf *m) * on the outgoing interface, loop back a copy. */ dst6 = &ro.ro_dst; - IN6_LOOKUP_MULTI(ip6->ip6_dst, ifp, in6m); - if (in6m != NULL) { + if (in6_hasmulti(&ip6->ip6_dst, ifp)) { dst6->sin6_len = sizeof(struct sockaddr_in6); dst6->sin6_family = AF_INET6; dst6->sin6_addr = ip6->ip6_dst; |