diff options
author | ume <ume@FreeBSD.org> | 2003-11-06 16:42:59 +0000 |
---|---|---|
committer | ume <ume@FreeBSD.org> | 2003-11-06 16:42:59 +0000 |
commit | bbea30a3ab460d90facab10eac52d60d36475733 (patch) | |
tree | f09ca871132576cb188020c177a4b4fcd2df3d14 /sys/netinet6 | |
parent | bf689a07a0631b2c73291f32f1d53c0bed960a6d (diff) | |
download | FreeBSD-src-bbea30a3ab460d90facab10eac52d60d36475733.zip FreeBSD-src-bbea30a3ab460d90facab10eac52d60d36475733.tar.gz |
correct behavior when ipv6mr_interface is 0. Matthias Drochner
Notified by: itojun
Obtained from: NetBSD
Diffstat (limited to 'sys/netinet6')
-rw-r--r-- | sys/netinet6/ip6_output.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c index 9665429..1885bc3 100644 --- a/sys/netinet6/ip6_output.c +++ b/sys/netinet6/ip6_output.c @@ -2651,8 +2651,8 @@ ip6_setmoptions(optname, im6op, m) /* * If the interface is specified, validate it. */ - if (mreq->ipv6mr_interface < 0 - || if_index < mreq->ipv6mr_interface) { + if (mreq->ipv6mr_interface < 0 || + if_index < mreq->ipv6mr_interface) { error = ENXIO; /* XXX EINVAL? */ break; } @@ -2701,8 +2701,8 @@ ip6_setmoptions(optname, im6op, m) * if the address has link-local scope. */ if (IN6_IS_ADDR_MC_LINKLOCAL(&mreq->ipv6mr_multiaddr)) { - mreq->ipv6mr_multiaddr.s6_addr16[1] - = htons(mreq->ipv6mr_interface); + mreq->ipv6mr_multiaddr.s6_addr16[1] = + htons(ifp->if_index); } /* * See if the membership already exists. |