summaryrefslogtreecommitdiffstats
path: root/sys/netipx/ipx_input.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2009-06-21 10:10:44 +0000
committerrwatson <rwatson@FreeBSD.org>2009-06-21 10:10:44 +0000
commitb867569d3ecacd8487aadc3fd07e29e03629bcfd (patch)
treed6260852700dfb0c8b70eb98c0e64c40f37190f9 /sys/netipx/ipx_input.c
parentbfca5b766dcbba5d363d14ad19521182daf04b69 (diff)
downloadFreeBSD-src-b867569d3ecacd8487aadc3fd07e29e03629bcfd.zip
FreeBSD-src-b867569d3ecacd8487aadc3fd07e29e03629bcfd.tar.gz
Remove historical support for capturing IPX packets in the output path
using raw IPX sockets. While functional, this support is disabled using a flag that can't be changed from userspace, and google reveals no documentation or use of that flag anywhere. This eliminates a potential lock order reversal and code reentrance issue in which the output path reentered the input path in IPX. An alternative to removal would be to use the netisr, as a comment I added in 2005 suggests. While this change is fairly straight-forward, the lack of any consumers or the easy possibility of consumers (kernel modification and recompile required) suggests that this is simply an unused feature. Update README to remove this TODO, and a TODO regarding IPX/IP encapsulation which was also removed a few years ago. MFC after: 1 week
Diffstat (limited to 'sys/netipx/ipx_input.c')
-rw-r--r--sys/netipx/ipx_input.c50
1 files changed, 0 insertions, 50 deletions
diff --git a/sys/netipx/ipx_input.c b/sys/netipx/ipx_input.c
index 2a0980a..f046e23 100644
--- a/sys/netipx/ipx_input.c
+++ b/sys/netipx/ipx_input.c
@@ -452,53 +452,3 @@ ipx_undo_route(struct route *ro)
RTFREE(ro->ro_rt);
}
}
-
-/*
- * XXXRW: This code should be run in its own netisr dispatch to avoid a call
- * back into the socket code from the IPX output path.
- */
-void
-ipx_watch_output(struct mbuf *m, struct ifnet *ifp)
-{
- struct ipxpcb *ipxp;
- struct ifaddr *ifa;
- struct ipx_ifaddr *ia;
-
- /*
- * Give any raw listeners a crack at the packet
- */
- IPX_LIST_LOCK();
- LIST_FOREACH(ipxp, &ipxrawpcb_list, ipxp_list) {
- struct mbuf *m0 = m_copy(m, 0, (int)M_COPYALL);
- if (m0 != NULL) {
- struct ipx *ipx;
-
- M_PREPEND(m0, sizeof(*ipx), M_DONTWAIT);
- if (m0 == NULL)
- continue;
- ipx = mtod(m0, struct ipx *);
- ipx->ipx_sna.x_net = ipx_zeronet;
- for (ia = ipx_ifaddr; ia != NULL; ia = ia->ia_next)
- if (ifp == ia->ia_ifp)
- break;
- if (ia == NULL)
- ipx->ipx_sna.x_host = ipx_zerohost;
- else
- ipx->ipx_sna.x_host =
- ia->ia_addr.sipx_addr.x_host;
-
- if (ifp != NULL && (ifp->if_flags & IFF_POINTOPOINT))
- TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
- if (ifa->ifa_addr->sa_family == AF_IPX) {
- ipx->ipx_sna = IA_SIPX(ifa)->sipx_addr;
- break;
- }
- }
- ipx->ipx_len = ntohl(m0->m_pkthdr.len);
- IPX_LOCK(ipxp);
- ipx_input(m0, ipxp);
- IPX_UNLOCK(ipxp);
- }
- }
- IPX_LIST_UNLOCK();
-}
OpenPOWER on IntegriCloud