patch-2.0.30 linux/net/ipv4/ip_sockglue.c
Next file: linux/net/ipv4/packet.c
Previous file: linux/net/ipv4/ip_masq_vdolive.c
Back to the patch index
Back to the overall index
- Lines: 23
- Date:
Tue Apr 8 08:47:47 1997
- Orig file:
v2.0.29/linux/net/ipv4/ip_sockglue.c
- Orig date:
Wed Jul 10 22:54:18 1996
diff -u --recursive --new-file v2.0.29/linux/net/ipv4/ip_sockglue.c linux/net/ipv4/ip_sockglue.c
@@ -407,6 +407,22 @@
return -err; /* -0 is 0 after all */
#endif
+#ifdef CONFIG_IP_MASQUERADE_IPAUTOFW
+ case IP_AUTOFW_ADD:
+ case IP_AUTOFW_DEL:
+ case IP_AUTOFW_FLUSH:
+ if(!suser())
+ return -EPERM;
+ if(optlen>sizeof(tmp_fw) || optlen<1)
+ return -EINVAL;
+ err=verify_area(VERIFY_READ,optval,optlen);
+ if(err)
+ return err;
+ memcpy_fromfs(&tmp_fw,optval,optlen);
+ err=ip_autofw_ctl(optname, &tmp_fw,optlen);
+ return -err; /* -0 is 0 after all */
+
+#endif
#ifdef CONFIG_IP_ACCT
case IP_ACCT_INSERT:
case IP_ACCT_APPEND:
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov