Subject: pppoectl(8) -d won't work
To: NetBSD Networking <tech-net@NetBSD.org>
From: Holger Weiss <email@example.com>
Date: 08/20/2007 01:25:34
On 4.99.28/sparc64, my pppoe(4) connection works just fine (apart from
the fact that IPv6 negotiation fails while it works with rp-pppoe, but I
guess that's another story---which I haven't looked into yet):
| $ ifconfig pppoe0
| pppoe0: flags=8851<UP,POINTOPOINT,RUNNING,SIMPLEX,MULTICAST> mtu 1424
| inet 188.8.131.52 -> 184.108.40.206 netmask 0xff000000
| inet6 fe80::a00:20ff:feac:1643%pppoe0 -> prefixlen 64 scopeid 0x4
| $ pppoectl -d pppoe0
| pppoe0: interface not found
To get the session state, pppoectl(8) does an ioctl(2) call with a
PPPOEGETSESSION request, which should be handled by pppoe(4)'s
pppoe_ioctl(). PPPOEGETSESSION evaluates to 3223349616. However, I
added some debug output to sys/net/if_pppoe.c and for some reason,
pppoe_ioctl() receives 3230689648 via its "cmd" argument. Therefore,
the call isn't caught by the PPPOEGETSESSION case within pppoe_ioctl().
Instead, it's handled by the default case, which hands it over to
sys/net/if_spppsubr.c:sppp_ioctl(), which in turn returns ENOTTY.
I didn't use pppoe(4) before, so I don't know whether this problem is
new. Can others reproduce it? Any ideas?