From: Paul Bolle <pebolle@tiscali.nl>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: Re: [i4l] stop address leakage when shutting down an i4l ppp interface
Date: Thu, 05 Mar 2009 14:00:58 +0100 [thread overview]
Message-ID: <1236258058.2644.25.camel@x41.thuisdomein> (raw)
In-Reply-To: <20090114.145035.194024897.davem@davemloft.net>
It took longer than I hoped to respond to your message.
On Wed, 2009-01-14 at 14:50 -0800, David Miller wrote:
> From: Paul Bolle <pebolle@tiscali.nl>
> > @@ -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;
> > }
>
> I think it's pretty much illegal to change the device type after the
> device has been registered.
But isn't that what the i4l code already does?
Bringing up an i4l ppp interface will (in Fedora's ifup-ippp script) do
(among a lot of other stuff):
isdnctrl addif ippp0
and then:
isdnctrl encap ippp0 syncppp
On the kernel side this will result (assuming, of course, I correctly
interpreted the relevant code) in these events:
isdn_ioctl(IIOCNETAIF)
isdn_net_new()
alloc_netdev()
_isdn_setup()
ether_setup()
[...]
dev->type = ARPHRD_ETHER
dev->addr_len = ETH_ALEN
[...]
register_netdev()
[...]
followed by these events:
isdn_ioctl(IIOCNETSCF)
isdn_net_setcfg()
[...]
case ISDN_NET_ENCAP_SYNCPPP:
p->dev->type = ARPHRD_PPP
p->dev->addr_len = 0
This looks to me like it's changing the device type after the device has
been registered. Or were you referring to something else?
Paul
prev parent reply other threads:[~2009-03-05 13:01 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
2009-03-05 13:00 ` Paul Bolle [this message]
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=1236258058.2644.25.camel@x41.thuisdomein \
--to=pebolle@tiscali.nl \
--cc=davem@davemloft.net \
--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