patch-1.3.19 linux/net/ipv4/arp.c
Next file: linux/net/ipv4/ip.c
Previous file: linux/net/ipv4/af_inet.c
Back to the patch index
Back to the overall index
- Lines: 35
- Date:
Tue Aug 15 14:45:20 1995
- Orig file:
v1.3.18/linux/net/ipv4/arp.c
- Orig date:
Sun Aug 13 14:45:36 1995
diff -u --recursive --new-file v1.3.18/linux/net/ipv4/arp.c linux/net/ipv4/arp.c
@@ -87,6 +87,7 @@
#endif
#endif
#include <linux/proc_fs.h>
+#include <linux/stat.h>
/*
@@ -687,9 +688,10 @@
memcpy(&tip,arp_ptr,4);
/*
- * Check for bad requests for 127.0.0.1. If this is one such, delete it.
+ * Check for bad requests for 127.x.x.x and requests for multicast
+ * addresses. If this is one such, delete it.
*/
- if(tip == INADDR_LOOPBACK)
+ if (IN_LOOPBACK(tip) || IN_MULTICAST(tip))
{
kfree_skb(skb, FREE_READ);
return 0;
@@ -1460,7 +1462,11 @@
/* Register for device down reports */
register_netdevice_notifier(&arp_dev_notifier);
-proc_net_register(&(struct proc_dir_entry)
- { PROC_NET_ARP, 3, "arp", arp_get_info });
+ proc_net_register(&(struct proc_dir_entry) {
+ PROC_NET_ARP, 3, "arp",
+ S_IFREG | S_IRUGO, 1, 0, 0,
+ 0, &proc_net_inode_operations,
+ arp_get_info
+ });
}
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