mirror of
https://git.FreeBSD.org/src.git
synced 2024-10-19 02:29:40 +00:00
ipfw(4) rule matching always happens in network epoch.
This commit is contained in:
parent
3ee93b74c7
commit
961c033ef1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=353494
@ -408,17 +408,15 @@ iface_match(struct ifnet *ifp, ipfw_insn_if *cmd, struct ip_fw_chain *chain,
|
||||
#if !defined(USERSPACE) && defined(__FreeBSD__) /* and OSX too ? */
|
||||
struct ifaddr *ia;
|
||||
|
||||
if_addr_rlock(ifp);
|
||||
NET_EPOCH_ASSERT();
|
||||
|
||||
CK_STAILQ_FOREACH(ia, &ifp->if_addrhead, ifa_link) {
|
||||
if (ia->ifa_addr->sa_family != AF_INET)
|
||||
continue;
|
||||
if (cmd->p.ip.s_addr == ((struct sockaddr_in *)
|
||||
(ia->ifa_addr))->sin_addr.s_addr) {
|
||||
if_addr_runlock(ifp);
|
||||
return(1); /* match */
|
||||
}
|
||||
(ia->ifa_addr))->sin_addr.s_addr)
|
||||
return (1); /* match */
|
||||
}
|
||||
if_addr_runlock(ifp);
|
||||
#endif /* __FreeBSD__ */
|
||||
}
|
||||
return(0); /* no match, fail ... */
|
||||
|
Loading…
Reference in New Issue
Block a user