diff options
-rw-r--r-- | net/ipv4/netfilter/ipt_MASQUERADE.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/net/ipv4/netfilter/ipt_MASQUERADE.c b/net/ipv4/netfilter/ipt_MASQUERADE.c index d80fee8327e4..313b3fcf387e 100644 --- a/net/ipv4/netfilter/ipt_MASQUERADE.c +++ b/net/ipv4/netfilter/ipt_MASQUERADE.c | |||
@@ -139,18 +139,8 @@ static int masq_inet_event(struct notifier_block *this, | |||
139 | unsigned long event, | 139 | unsigned long event, |
140 | void *ptr) | 140 | void *ptr) |
141 | { | 141 | { |
142 | const struct net_device *dev = ((struct in_ifaddr *)ptr)->ifa_dev->dev; | 142 | struct net_device *dev = ((struct in_ifaddr *)ptr)->ifa_dev->dev; |
143 | 143 | return masq_device_event(this, event, dev); | |
144 | if (event == NETDEV_DOWN) { | ||
145 | /* IP address was deleted. Search entire table for | ||
146 | conntracks which were associated with that device, | ||
147 | and forget them. */ | ||
148 | NF_CT_ASSERT(dev->ifindex != 0); | ||
149 | |||
150 | nf_ct_iterate_cleanup(device_cmp, (void *)(long)dev->ifindex); | ||
151 | } | ||
152 | |||
153 | return NOTIFY_DONE; | ||
154 | } | 144 | } |
155 | 145 | ||
156 | static struct notifier_block masq_dev_notifier = { | 146 | static struct notifier_block masq_dev_notifier = { |