diff options
author | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2003-11-07 22:32:48 +0000 |
---|---|---|
committer | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2003-11-07 22:32:48 +0000 |
commit | 19f70c3ee0dbb8ec50dfe43f7335ea2e1804f8a7 (patch) | |
tree | 2d953b242ef2fd2c4387cede79cc46c28fc04ade /sys/netinet6/ip6_output.c | |
parent | 7657cd694ab6e17f5f2c478e49f2a8c33c9f06bb (diff) |
fix behavior when ipv6mr_interface is 0. reported on netbsd list
Diffstat (limited to 'sys/netinet6/ip6_output.c')
-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 1d5b07ccc9d..058c390b16d 100644 --- a/sys/netinet6/ip6_output.c +++ b/sys/netinet6/ip6_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip6_output.c,v 1.78 2003/10/01 21:41:05 itojun Exp $ */ +/* $OpenBSD: ip6_output.c,v 1.79 2003/11/07 22:32:47 itojun Exp $ */ /* $KAME: ip6_output.c,v 1.172 2001/03/25 09:55:56 itojun Exp $ */ /* @@ -1848,8 +1848,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; } @@ -1899,7 +1899,7 @@ ip6_setmoptions(optname, im6op, m) */ if (IN6_IS_ADDR_MC_LINKLOCAL(&mreq->ipv6mr_multiaddr)) { mreq->ipv6mr_multiaddr.s6_addr16[1] = - htons(mreq->ipv6mr_interface); + htons(ifp->if_index); } /* * See if the membership already exists. |