patch-2.4.23 linux-2.4.23/net/ipv4/netfilter/ip_fw_compat.c
Next file: linux-2.4.23/net/ipv4/netfilter/ip_nat_amanda.c
Previous file: linux-2.4.23/net/ipv4/netfilter/ip_conntrack_standalone.c
Back to the patch index
Back to the overall index
- Lines: 29
- Date:
2003-11-28 10:26:21.000000000 -0800
- Orig file:
linux-2.4.22/net/ipv4/netfilter/ip_fw_compat.c
- Orig date:
2001-12-21 09:42:05.000000000 -0800
diff -urN linux-2.4.22/net/ipv4/netfilter/ip_fw_compat.c linux-2.4.23/net/ipv4/netfilter/ip_fw_compat.c
@@ -47,6 +47,12 @@
extern int __init masq_init(void);
extern void masq_cleanup(void);
+#ifdef CONFIG_IP_VS
+/* From ip_vs_core.c */
+extern unsigned int
+check_for_ip_vs_out(struct sk_buff **skb_p, int (*okfn)(struct sk_buff *));
+#endif
+
/* They call these; we do what they want. */
int register_firewall(int pf, struct firewall_ops *fw)
{
@@ -172,8 +178,14 @@
return NF_ACCEPT;
case FW_MASQUERADE:
- if (hooknum == NF_IP_FORWARD)
+ if (hooknum == NF_IP_FORWARD) {
+#ifdef CONFIG_IP_VS
+ /* check if it is for ip_vs */
+ if (check_for_ip_vs_out(pskb, okfn) == NF_STOLEN)
+ return NF_STOLEN;
+#endif
return do_masquerade(pskb, out);
+ }
else return NF_ACCEPT;
case FW_REDIRECT:
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)