Implement socket delivery MAC checks for IPX/SPX.
Obtained from: TrustedBSD Project MFC after: 3 days
This commit is contained in:
parent
e3cb9d1015
commit
da67353208
@ -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…
x
Reference in New Issue
Block a user