diff options
| -rw-r--r-- | net/ipv4/netfilter/ipt_MASQUERADE.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/ipv4/netfilter/ipt_MASQUERADE.c b/net/ipv4/netfilter/ipt_MASQUERADE.c index 28b9233956b5..d669685afd04 100644 --- a/net/ipv4/netfilter/ipt_MASQUERADE.c +++ b/net/ipv4/netfilter/ipt_MASQUERADE.c | |||
| @@ -127,10 +127,13 @@ masquerade_target(struct sk_buff **pskb, | |||
| 127 | static inline int | 127 | static inline int |
| 128 | device_cmp(struct ip_conntrack *i, void *ifindex) | 128 | device_cmp(struct ip_conntrack *i, void *ifindex) |
| 129 | { | 129 | { |
| 130 | int ret; | ||
| 130 | #ifdef CONFIG_NF_NAT_NEEDED | 131 | #ifdef CONFIG_NF_NAT_NEEDED |
| 131 | struct nf_conn_nat *nat = nfct_nat(i); | 132 | struct nf_conn_nat *nat = nfct_nat(i); |
| 133 | |||
| 134 | if (!nat) | ||
| 135 | return 0; | ||
| 132 | #endif | 136 | #endif |
| 133 | int ret; | ||
| 134 | 137 | ||
| 135 | read_lock_bh(&masq_lock); | 138 | read_lock_bh(&masq_lock); |
| 136 | #ifdef CONFIG_NF_NAT_NEEDED | 139 | #ifdef CONFIG_NF_NAT_NEEDED |
