netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [i4l] stop address leakage when shutting down an i4l ppp interface
@ 2009-01-12 12:54 Paul Bolle
  2009-01-14 22:50 ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Bolle @ 2009-01-12 12:54 UTC (permalink / raw)
  To: netdev

When an i4l ppp interface is shut down (e.g. with /sbin/ifdown ippp0)
__dev_addr-discard() warns us for "address leakage":
    
    __dev_addr_discard: address leakage! da_users=1
    
The easiest way to stop that leakage is to partly change that interface's
net_device at the end of isdn_net_close() so that it will be acceptable to
arp_mc_map().
    
Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
---
Please note that I hardly understand what multicast lists are, and why
an i4l ppp interface uses those, etc. I just pinpointed the problem with
a few printk()s. This patch tries to fix only this specific problem
while touching as little as possible (i.e. it only covers the "address
leakage" that I was able to trigger).

Anyhow, a critical review of this patch would be appreciated. 

Sent only to netdev@vger.kernel.org (and not also to
isdn4linux@listserv.isdn4linux.de) because an earlier ISDN patch I wrote
only got a response from this list (and this patch is NETWORKING related
anyway).
---
diff --git a/drivers/isdn/i4l/isdn_net.c b/drivers/isdn/i4l/isdn_net.c
index cb8943d..d58e952 100644
--- a/drivers/isdn/i4l/isdn_net.c
+++ b/drivers/isdn/i4l/isdn_net.c
@@ -1336,6 +1336,13 @@ isdn_net_close(struct net_device *dev)
 	}
 	isdn_net_hangup(dev);
 	isdn_unlock_drivers();
+#ifdef CONFIG_ISDN_PPP
+	/* make sure arp_mc_map() handles this device properly */
+	if (dev->type == ARPHRD_PPP) {
+		dev->type = ARPHRD_ETHER;
+		dev->addr_len = ETH_ALEN;
+	}
+#endif
 	return 0;
 }
 



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-03-05 13:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-12 12:54 [i4l] stop address leakage when shutting down an i4l ppp interface Paul Bolle
2009-01-14 22:50 ` David Miller
2009-03-05 13:00   ` Paul Bolle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).