On OpenBSD 4.0 release, I'm trying to get up ppp(8) to run over UDP. The
manpage isn't clear about how to set up the server side of this.

I've added to /etc/services:

ppp-in          6669/udp
ppp-in          6669/tcp

And to /etc/inetd.conf:

ppp-in          dgram   udp     nowait  root    /usr/sbin/ppp ppp -direct ppp-in
ppp-in          stream  tcp     nowait  root    /usr/sbin/ppp ppp -direct ppp-in

and HUP'd inetd.

/etc/ppp/ppp.conf contains:

ppp-in:
        set timeout 0
        set ifaddr 10.0.4.1 10.0.4.2

This works for incoming connections over TCP, but not UDP.

I've tried both 'wait' and 'nowait' in inetd.conf. In both cases, when I
send a single UDP packet using nc, I immediately get 4 ppp children started
(which I suspect is limited just by the number of 'tun' devices available)

# ps auxwww | grep ppp
# nc -u 127.0.0.1 6669
foo
?_?foo
^C
# ps auxwww | grep ppp
root      5298  0.0  0.3   660  1468 ??  Ss     4:41PM    0:00.02 ppp -direct 
ppp-in
root     10152  0.0  0.3   688  1476 ??  Ss     4:41PM    0:00.02 ppp -direct 
ppp-in
root     20206  0.0  0.3   668  1484 ??  Ss     4:41PM    0:00.01 ppp -direct 
ppp-in
root     12291  0.0  0.3   532  1460 ??  Ss     4:41PM    0:00.01 ppp -direct 
ppp-in
#

The same applies when using ppp itself as the client:

# ps auxwww | grep ppp
# ppp
Working in interactive mode
Warning: iface rm: ioctl(SIOCDIFADDR_IN6, fe80:d::248:XXXX:XXXX:XXXX/64): Can't 
assign requested address
Using interface: tun0
Warning: No default entry found in config file.
ppp ON gw> set device localhost:6669/udp
ppp ON gw> set speed sync
ppp ON gw> set log all
ppp ON gw> dial
ppp ON gw>
PPp ON gw> Warning: ff02:d::/32: Change route failed: errno: Network is 
unreachable
ppp ON gw>
PPp ON gw>

[on another screen]
# ps auxwww | grep ppp
root      5683  0.0  0.3   708  1488 ??  Ss     4:43PM    0:00.01 ppp -direct 
ppp-in
root     21871  0.0  0.3   624  1480 ??  Ss     4:43PM    0:00.02 ppp -direct 
ppp-in
root     23410  0.0  0.3   572  1468 ??  Ss     4:43PM    0:00.02 ppp -direct 
ppp-in
root     23090  0.0  0.3   736  1592 p2  S+     4:43PM    0:00.01 ppp

So, something's not right here. Have I just made a simple error, or is there
something other than inetd required to accept incoming PPP-over-UDP
connections?

Regards,

Brian.

Reply via email to