From: Paul Bolle <pebolle@tiscali.nl>
To: netdev@vger.kernel.org
Subject: [i4l] stop address leakage when shutting down an i4l ppp interface
Date: Mon, 12 Jan 2009 13:54:49 +0100 [thread overview]
Message-ID: <1231764889.7132.23.camel@test.thuisdomein> (raw)
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;
}
next reply other threads:[~2009-01-12 12:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-12 12:54 Paul Bolle [this message]
2009-01-14 22:50 ` [i4l] stop address leakage when shutting down an i4l ppp interface David Miller
2009-03-05 13:00 ` Paul Bolle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1231764889.7132.23.camel@test.thuisdomein \
--to=pebolle@tiscali.nl \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).