mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-15 10:17:20 +00:00
correct behavior when ipv6mr_interface is 0. Matthias Drochner
Notified by: itojun Obtained from: NetBSD
This commit is contained in:
parent
96ea7698a2
commit
07027f9d23
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=122174
@ -2651,8 +2651,8 @@ ip6_setmoptions(optname, im6op, m)
|
|||||||
/*
|
/*
|
||||||
* If the interface is specified, validate it.
|
* If the interface is specified, validate it.
|
||||||
*/
|
*/
|
||||||
if (mreq->ipv6mr_interface < 0
|
if (mreq->ipv6mr_interface < 0 ||
|
||||||
|| if_index < mreq->ipv6mr_interface) {
|
if_index < mreq->ipv6mr_interface) {
|
||||||
error = ENXIO; /* XXX EINVAL? */
|
error = ENXIO; /* XXX EINVAL? */
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -2701,8 +2701,8 @@ ip6_setmoptions(optname, im6op, m)
|
|||||||
* if the address has link-local scope.
|
* if the address has link-local scope.
|
||||||
*/
|
*/
|
||||||
if (IN6_IS_ADDR_MC_LINKLOCAL(&mreq->ipv6mr_multiaddr)) {
|
if (IN6_IS_ADDR_MC_LINKLOCAL(&mreq->ipv6mr_multiaddr)) {
|
||||||
mreq->ipv6mr_multiaddr.s6_addr16[1]
|
mreq->ipv6mr_multiaddr.s6_addr16[1] =
|
||||||
= htons(mreq->ipv6mr_interface);
|
htons(ifp->if_index);
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* See if the membership already exists.
|
* See if the membership already exists.
|
||||||
|
Loading…
Reference in New Issue
Block a user