patch-2.4.4 linux/net/ipv4/netfilter/ip_nat_rule.c
Next file: linux/net/ipv4/netfilter/ip_nat_standalone.c
Previous file: linux/net/ipv4/netfilter/ip_nat_helper.c
Back to the patch index
Back to the overall index
- Lines: 26
- Date:
Fri Apr 27 14:15:01 2001
- Orig file:
v2.4.3/linux/net/ipv4/netfilter/ip_nat_rule.c
- Orig date:
Thu Aug 10 12:35:15 2000
diff -u --recursive --new-file v2.4.3/linux/net/ipv4/netfilter/ip_nat_rule.c linux/net/ipv4/netfilter/ip_nat_rule.c
@@ -173,6 +173,12 @@
return 0;
}
+ /* Only allow these for NAT. */
+ if (strcmp(tablename, "nat") != 0) {
+ DEBUGP("SNAT: wrong table %s\n", tablename);
+ return 0;
+ }
+
if (hook_mask & ~(1 << NF_IP_POST_ROUTING)) {
DEBUGP("SNAT: hook mask 0x%x bad\n", hook_mask);
return 0;
@@ -199,6 +205,12 @@
* (mr->rangesize - 1))))) {
DEBUGP("DNAT: Target size %u wrong for %u ranges\n",
targinfosize, mr->rangesize);
+ return 0;
+ }
+
+ /* Only allow these for NAT. */
+ if (strcmp(tablename, "nat") != 0) {
+ DEBUGP("SNAT: wrong table %s\n", tablename);
return 0;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)