mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
Implement socket delivery MAC checks for IPX/SPX.
Obtained from: TrustedBSD Project MFC after: 3 days
This commit is contained in:
parent
deb090cba3
commit
c0a8cee371
2 changed files with 11 additions and 0 deletions
|
|
@ -187,6 +187,12 @@ ipx_input(struct mbuf *m, struct ipxpcb *ipxp)
|
|||
m->m_pkthdr.len -= sizeof(struct ipx);
|
||||
m->m_data += sizeof(struct ipx);
|
||||
}
|
||||
#ifdef MAC
|
||||
if (mac_socket_check_deliver(ipxp->ipxp_socket, m) != 0) {
|
||||
m_freem(m);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
if (sbappendaddr(&ipxp->ipxp_socket->so_rcv,
|
||||
(struct sockaddr *)&ipx_ipx, m, NULL) == 0)
|
||||
m_freem(m);
|
||||
|
|
|
|||
|
|
@ -225,6 +225,11 @@ spx_input(struct mbuf *m, struct ipxpcb *ipxp)
|
|||
so = ipxp->ipxp_socket;
|
||||
KASSERT(so != NULL, ("spx_input: so == NULL"));
|
||||
|
||||
#ifdef MAC
|
||||
if (mac_socket_check_deliver(so, m) != 0)
|
||||
goto drop;
|
||||
#endif
|
||||
|
||||
if (so->so_options & SO_DEBUG || traceallspxs) {
|
||||
ostate = cb->s_state;
|
||||
spx_savesi = *si;
|
||||
|
|
|
|||
Loading…
Reference in a new issue