Open Source Telephony
 help / color / mirror / Atom feed
* tun interface name conflicts with ppp driver
@ 2012-12-06 11:13 Cedric Jehasse
  2012-12-06 11:50 ` Marcel Holtmann
  0 siblings, 1 reply; 4+ messages in thread
From: Cedric Jehasse @ 2012-12-06 11:13 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 360 bytes --]

Hi,

when a context is active, the interface name is typically ppp0. If you try
to run pppd for some other device/interface, the kernel ppp driver prints
an error because it can't register ppp0. It looks like it's assumed that
ppp* interface names are reserved for the ppp_driver.
Can the tun interface name be changed to eg. ofono0?

thanks,
Cedric

[-- Attachment #2: attachment.html --]
[-- Type: text/html, Size: 427 bytes --]

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

* Re: tun interface name conflicts with ppp driver
  2012-12-06 11:13 tun interface name conflicts with ppp driver Cedric Jehasse
@ 2012-12-06 11:50 ` Marcel Holtmann
  2012-12-06 14:58   ` Cedric Jehasse
  0 siblings, 1 reply; 4+ messages in thread
From: Marcel Holtmann @ 2012-12-06 11:50 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 669 bytes --]

Hi Cedric,

> when a context is active, the interface name is typically ppp0. If you try
> to run pppd for some other device/interface, the kernel ppp driver prints
> an error because it can't register ppp0. It looks like it's assumed that
> ppp* interface names are reserved for the ppp_driver.
> Can the tun interface name be changed to eg. ofono0?

actually we are using ppp%d syntax to assign the network interfaces. So
the kernel does the numbering. This is a bug in pppd and not ours.

Looking at the pppd code, it seems to hardcodes ppp0. So please complain
to them for assuming that a certain device name is owned by them.

Regards

Marcel



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

* Re: tun interface name conflicts with ppp driver
  2012-12-06 11:50 ` Marcel Holtmann
@ 2012-12-06 14:58   ` Cedric Jehasse
  2012-12-06 15:59     ` Marcel Holtmann
  0 siblings, 1 reply; 4+ messages in thread
From: Cedric Jehasse @ 2012-12-06 14:58 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 813 bytes --]

Hi Marcel,


> actually we are using ppp%d syntax to assign the network interfaces. So
> the kernel does the numbering. This is a bug in pppd and not ours.
>
> Looking at the pppd code, it seems to hardcodes ppp0. So please complain
> to them for assuming that a certain device name is owned by them.
>

pppd requests the ppp driver to create a network interface with the ioctl
 PPPIOCNEWUNIT. If the parameter passed to the ioctl is -1, the ppp driver
will allocate the unit itself. Because it's the first network interface
created by the ppp driver, and the ppp driver doesn't know about the tun
interface, it's choosing 0. Check ppp_create_interface() in ppp_generic.c
in the kernel to see how this is done.

So it seems the ppp driver reserves the ppp%d interface names.

Regards,
Cedric

[-- Attachment #2: attachment.html --]
[-- Type: text/html, Size: 1097 bytes --]

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

* Re: tun interface name conflicts with ppp driver
  2012-12-06 14:58   ` Cedric Jehasse
@ 2012-12-06 15:59     ` Marcel Holtmann
  0 siblings, 0 replies; 4+ messages in thread
From: Marcel Holtmann @ 2012-12-06 15:59 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 1035 bytes --]

Hi Cedric,

> > actually we are using ppp%d syntax to assign the network interfaces. So
> > the kernel does the numbering. This is a bug in pppd and not ours.
> >
> > Looking at the pppd code, it seems to hardcodes ppp0. So please complain
> > to them for assuming that a certain device name is owned by them.
> >
> 
> pppd requests the ppp driver to create a network interface with the ioctl
>  PPPIOCNEWUNIT. If the parameter passed to the ioctl is -1, the ppp driver
> will allocate the unit itself. Because it's the first network interface
> created by the ppp driver, and the ppp driver doesn't know about the tun
> interface, it's choosing 0. Check ppp_create_interface() in ppp_generic.c
> in the kernel to see how this is done.
> 
> So it seems the ppp driver reserves the ppp%d interface names.

that is not how the kernel works. It is global and tun interface will
not interfere with ppp interface. In case ppp driver and pppd would do
it right, then there would be no conflict.

Regards

Marcel



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

end of thread, other threads:[~2012-12-06 15:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-06 11:13 tun interface name conflicts with ppp driver Cedric Jehasse
2012-12-06 11:50 ` Marcel Holtmann
2012-12-06 14:58   ` Cedric Jehasse
2012-12-06 15:59     ` Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox