From: David Miller <davem@davemloft.net>
To: pebolle@tiscali.nl
Cc: netdev@vger.kernel.org
Subject: Re: [i4l] stop address leakage when shutting down an i4l ppp interface
Date: Wed, 14 Jan 2009 14:50:35 -0800 (PST) [thread overview]
Message-ID: <20090114.145035.194024897.davem@davemloft.net> (raw)
In-Reply-To: <1231764889.7132.23.camel@test.thuisdomein>
From: Paul Bolle <pebolle@tiscali.nl>
Date: Mon, 12 Jan 2009 13:54:49 +0100
> @@ -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;
> }
Just like the CONFIG_ISDN_PPP case, this code also changes the
p->dev->type and clears p->dev->addr_len for CONFIG_ISDN_X25
So at a minimum you'd need to add a case for that here as well.
I think it's pretty much illegal to change the device type after the
device has been registered. Probably a lot of surgery is needed
here to correct this.
Althought what might work is to unregister then re-register the
device when the device type needs to be changed. That should
work as long as it doesn't cause other undesirable side effects.
next prev parent reply other threads:[~2009-01-14 22:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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=20090114.145035.194024897.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=pebolle@tiscali.nl \
/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).