[PATCH 3/17 net-2.6.26] [NETFILTER]: Consolidate masq_inet_event and masq_device_event.

2008-02-18 Thread Denis V. Lunev
They do exactly the same job.

Signed-off-by: Denis V. Lunev <[EMAIL PROTECTED]>
---
 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 d80fee8..313b3fc 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,
   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 = {
-- 
1.5.3.rc5

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 3/17 net-2.6.26] [NETFILTER]: Consolidate masq_inet_event and masq_device_event.

2008-02-19 Thread Patrick McHardy

Denis V. Lunev wrote:

They do exactly the same job.

Signed-off-by: Denis V. Lunev <[EMAIL PROTECTED]>
---
 net/ipv4/netfilter/ipt_MASQUERADE.c |   14 ++
 1 files changed, 2 insertions(+), 12 deletions(-)


Looks fine.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html