patch-2.3.15 linux/net/ipx/af_ipx.c

Next file: linux/net/ipx/af_spx.c
Previous file: linux/net/ipv6/udp.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.14/linux/net/ipx/af_ipx.c linux/net/ipx/af_ipx.c
@@ -96,7 +96,6 @@
 #include <net/psnap.h>
 #include <linux/proc_fs.h>
 #include <linux/stat.h>
-#include <linux/firewall.h>
 #include <linux/init.h>
 #include <linux/if_arp.h>
 
@@ -718,13 +717,6 @@
 	struct ipxhdr	*ipx = skb->nh.ipxh;
 	ipx_interface	*i;
 
-	/* We firewall first, ask questions later. */
-	if (call_in_firewall(PF_IPX, skb->dev, ipx, NULL, &skb)!=FW_ACCEPT)
-	{
-		kfree_skb(skb);
-		return (0);
-	}
-
 	/* See if we should update our network number */
 	if(!intrfc->if_netnum  /* net number of intrfc not known yet (== 0) */
 		&& (ipx->ipx_source.net == ipx->ipx_dest.net) /* intra packet */
@@ -790,13 +782,8 @@
 				if(i - 1 == ipx->ipx_tctrl) 
 				{
 					ipx->ipx_dest.net = ifcs->if_netnum;
-					/* See if we are allowed to firewall forward */
-					if(call_fw_firewall(PF_IPX, skb->dev, ipx, NULL, &skb) == FW_ACCEPT)
-					{
-					        skb2=skb_clone(skb, GFP_ATOMIC);
-						if(skb2)
-							ipxrtr_route_skb(skb2);
-					}
+					skb2=skb_clone(skb, GFP_ATOMIC);
+					ipxrtr_route_skb(skb2);
 				}
 			}
 
@@ -812,13 +799,6 @@
 
 	if(intrfc->if_netnum != ipx->ipx_dest.net)
 	{
-		/* See if we are allowed to firewall forward */
-		if(call_fw_firewall(PF_IPX, skb->dev, ipx, NULL, &skb) != FW_ACCEPT)
-		{
-			kfree_skb(skb);
-			return (0);
-		}
-
 		/* We only route point-to-point packets. */
 		if(skb->pkt_type == PACKET_HOST)
 		{
@@ -937,7 +917,7 @@
 		&& (ipxitf_find_using_net(idef->ipx_network) != NULL))
 		return (-EADDRINUSE);
 
-	dev = dev_get(idef->ipx_device);
+	dev = __dev_get_by_name(idef->ipx_device);
 	if(dev == NULL)
 		return (-ENODEV);
 
@@ -1043,7 +1023,7 @@
 	if(dlink_type == 0)
 		return (-EPROTONOSUPPORT);
 
-	dev = dev_get(idef->ipx_device);
+	dev = __dev_get_by_name(idef->ipx_device);
 	if(dev == NULL)
 		return (-ENODEV);
 
@@ -1154,7 +1134,7 @@
 				return (-EFAULT);
 
 			sipx = (struct sockaddr_ipx *)&ifr.ifr_addr;
-			dev = dev_get(ifr.ifr_name);
+			dev = __dev_get_by_name(ifr.ifr_name);
 			if(!dev)
 				return (-ENODEV);
 
@@ -1424,12 +1404,6 @@
 	else
 		ipx->ipx_checksum = ipx_set_checksum(ipx, len + sizeof(struct ipxhdr));
 
-	if(call_out_firewall(PF_IPX, skb->dev, ipx, NULL, &skb) != FW_ACCEPT)
-	{
-		kfree_skb(skb);
-		return (-EPERM);
-	}
-	
 	return (ipxitf_send(intrfc, skb, (rt && rt->ir_routed) ? 
 				rt->ir_router_node : ipx->ipx_dest.node));
 }
@@ -1813,7 +1787,7 @@
 	return (0);
 }
 
-static int ipx_release(struct socket *sock, struct socket *peer)
+static int ipx_release(struct socket *sock)
 {
 	struct sock *sk = sock->sk;
 
@@ -2010,12 +1984,6 @@
 
 static int ipx_accept(struct socket *sock, struct socket *newsock, int flags)
 {
-	if(newsock->sk)
-	{
-		sk_free(newsock->sk);
-		MOD_DEC_USE_COUNT;
-	}
-
 	return (-EOPNOTSUPP);
 }
 
@@ -2367,9 +2335,8 @@
 	ipx_create
 };
 
-static struct proto_ops ipx_dgram_ops = {
+static struct proto_ops SOCKOPS_WRAPPED(ipx_dgram_ops) = {
 	PF_IPX,
-	sock_no_dup,
 	ipx_release,
 	ipx_bind,
 	ipx_connect,
@@ -2384,8 +2351,13 @@
 	ipx_getsockopt,
 	sock_no_fcntl,
 	ipx_sendmsg,
-	ipx_recvmsg
+	ipx_recvmsg,
+	sock_no_mmap
 };
+
+#include <linux/smp_lock.h>
+SOCKOPS_WRAP(ipx_dgram, PF_IPX);
+
 
 /* Called by protocol.c on kernel start up */
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)