patch-1.3.19 linux/net/ipv4/rarp.c

Next file: linux/net/ipx/Makefile
Previous file: linux/net/ipv4/ip_fw.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.18/linux/net/ipv4/rarp.c linux/net/ipv4/rarp.c
@@ -199,8 +199,8 @@
 /*
  *	We shouldn't use this type conversion. Check later.
  */
-	struct arphdr *rarp = (struct arphdr *)skb_pull(skb,sizeof(struct arphdr));
-	unsigned char *rarp_ptr = skb->data;
+	struct arphdr *rarp = (struct arphdr *) skb->data;
+	unsigned char *rarp_ptr = skb_pull(skb,sizeof(struct arphdr));
 	struct rarp_table *entry;
 	long sip,tip;
 	unsigned char *sha,*tha;            /* s for "source", t for "target" */
@@ -545,8 +545,12 @@
 void
 rarp_init(void)
 {
-	proc_net_register(&(struct proc_dir_entry)
-		  { PROC_NET_RARP, 4, "rarp", rarp_get_info });
+	proc_net_register(&(struct proc_dir_entry) {
+		PROC_NET_RARP, 4, "rarp",
+		S_IFREG | S_IRUGO, 1, 0, 0,
+		0, &proc_net_inode_operations,
+		rarp_get_info
+	});
 	rarp_ioctl_hook = rarp_ioctl;
 }
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this