Prison check addresses set with multicast interface options.
Reviewed by: bz MFC after: 1 week
This commit is contained in:
@@ -889,17 +889,20 @@ in_pcbconnect_setup(struct inpcb *inp, struct sockaddr *nam,
|
||||
if (imo->imo_multicast_ifp != NULL) {
|
||||
ifp = imo->imo_multicast_ifp;
|
||||
IN_IFADDR_RLOCK();
|
||||
TAILQ_FOREACH(ia, &V_in_ifaddrhead, ia_link)
|
||||
if (ia->ia_ifp == ifp)
|
||||
TAILQ_FOREACH(ia, &V_in_ifaddrhead, ia_link) {
|
||||
if ((ia->ia_ifp == ifp) &&
|
||||
(cred == NULL ||
|
||||
prison_check_ip4(cred,
|
||||
&ia->ia_addr.sin_addr) == 0))
|
||||
break;
|
||||
if (ia == NULL) {
|
||||
IN_IFADDR_RUNLOCK();
|
||||
}
|
||||
if (ia == NULL)
|
||||
error = EADDRNOTAVAIL;
|
||||
} else {
|
||||
else {
|
||||
laddr = ia->ia_addr.sin_addr;
|
||||
IN_IFADDR_RUNLOCK();
|
||||
error = 0;
|
||||
}
|
||||
IN_IFADDR_RUNLOCK();
|
||||
}
|
||||
}
|
||||
if (error)
|
||||
|
||||
Reference in New Issue
Block a user