[NETFILTER]: Consolidate masq_inet_event and masq_device_event.
authorDenis V. Lunev <den@openvz.org>
Fri, 29 Feb 2008 04:45:41 +0000 (20:45 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 29 Feb 2008 04:45:41 +0000 (20:45 -0800)
They do exactly the same job.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Acked-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/netfilter/ipt_MASQUERADE.c

index d80fee8327e4c156f672386cff5b29b625f6e440..313b3fcf387e0dd724174253f7aa6b4825ffc185 100644 (file)
@@ -139,18 +139,8 @@ static int masq_inet_event(struct notifier_block *this,
                           unsigned long event,
                           void *ptr)
 {
-       const struct net_device *dev = ((struct in_ifaddr *)ptr)->ifa_dev->dev;
-
-       if (event == NETDEV_DOWN) {
-               /* IP address was deleted.  Search entire table for
-                  conntracks which were associated with that device,
-                  and forget them. */
-               NF_CT_ASSERT(dev->ifindex != 0);
-
-               nf_ct_iterate_cleanup(device_cmp, (void *)(long)dev->ifindex);
-       }
-
-       return NOTIFY_DONE;
+       struct net_device *dev = ((struct in_ifaddr *)ptr)->ifa_dev->dev;
+       return masq_device_event(this, event, dev);
 }
 
 static struct notifier_block masq_dev_notifier = {