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

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

diff -u --recursive --new-file v1.3.18/linux/net/ipv4/ip_fw.c linux/net/ipv4/ip_fw.c
@@ -1550,17 +1550,33 @@
 void ip_fw_init(void)
 {
 #ifdef CONFIG_IP_ACCT
-proc_net_register(&(struct proc_dir_entry)
-	{ PROC_NET_IPACCT, 7, "ip_acct", ip_acct_procinfo });
+	proc_net_register(&(struct proc_dir_entry) {
+		PROC_NET_IPACCT, 7, "ip_acct",
+		S_IFREG | S_IRUGO | S_IWUSR, 1, 0, 0,
+		0, &proc_net_inode_operations,
+		ip_acct_procinfo
+	});
 #endif
 #ifdef CONFIG_IP_FIREWALL
-proc_net_register(&(struct proc_dir_entry)
-	{ PROC_NET_IPFWBLK, 8, "ip_block", ip_fw_blk_procinfo });
-proc_net_register(&(struct proc_dir_entry)
-	{ PROC_NET_IPFWFWD, 10, "ip_forward", ip_fw_fwd_procinfo });
+	proc_net_register(&(struct proc_dir_entry) {
+		PROC_NET_IPFWBLK, 8, "ip_block",
+		S_IFREG | S_IRUGO | S_IWUSR, 1, 0, 0,
+		0, &proc_net_inode_operations,
+		ip_fw_blk_procinfo
+	});
+	proc_net_register(&(struct proc_dir_entry) {
+		PROC_NET_IPFWFWD, 10, "ip_forward",
+		S_IFREG | S_IRUGO | S_IWUSR, 1, 0, 0,
+		0, &proc_net_inode_operations,
+		ip_fw_fwd_procinfo
+	});
 #endif
 #ifdef CONFIG_IP_MASQUERADE
-proc_net_register(&(struct proc_dir_entry)
-	{ PROC_NET_IPMSQHST, 13, "ip_masquerade", ip_msqhst_procinfo });
+	proc_net_register(&(struct proc_dir_entry) {
+		PROC_NET_IPMSQHST, 13, "ip_masquerade",
+		S_IFREG | S_IRUGO, 1, 0, 0,
+		0, &proc_net_inode_operations,
+		ip_msqhst_procinfo
+	});
 #endif
 }

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