patch-2.1.15 linux/net/ipv4/packet.c

Next file: linux/net/ipv4/proc.c
Previous file: linux/net/ipv4/ipmr.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.14/linux/net/ipv4/packet.c linux/net/ipv4/packet.c
@@ -96,7 +96,6 @@
 	 
 	if(sock_queue_rcv_skb(sk,skb)<0)
 	{
-		skb->sk = NULL;
 		kfree_skb(skb, FREE_READ);
 		return 0;
 	}
@@ -113,8 +112,7 @@
  *	protocol layers and you must therefore supply it with a complete frame
  */
  
-static int packet_sendmsg(struct sock *sk, struct msghdr *msg, int len,
-	      int noblock, int flags)
+static int packet_sendmsg(struct sock *sk, struct msghdr *msg, int len)
 {
 	struct sk_buff *skb;
 	struct device *dev;
@@ -126,7 +124,7 @@
 	 *	Check the flags. 
 	 */
 
-	if (flags) 
+	if (msg->msg_flags&~MSG_DONTWAIT) 
 		return(-EINVAL);
 
 	/*
@@ -179,11 +177,11 @@
 	 *	Fill it in 
 	 */
 	 
-	skb->sk = sk;
-	skb->free = 1;
 	err = memcpy_fromiovec(skb_put(skb,len), msg->msg_iov, len);
 	skb->arp = 1;	/* No ARP needs doing on this (complete) frame */
 	skb->protocol = proto;
+	skb->dev = dev;
+	skb->priority = sk->priority;
 
 	/*
 	 *	Now send it
@@ -207,7 +205,7 @@
 		return err;
 	}
 		
-	dev_queue_xmit(skb, dev, sk->priority);
+	dev_queue_xmit(skb);
 	return(len);
 }
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov