Subject: Re: about ETOOMANYREFS using ppp.
To: Christos Zoulas <christos@zoulas.com>
From: =?ISO-8859-1?Q?C=E9sar_Catri=E1n?= C. <ccatrian@eml.cc>
List: netbsd-help
Date: 01/19/2005 01:10:03
On Thu, 13 Jan 2005 18:32:41 -0500
christos@zoulas.com (Christos Zoulas) wrote:
>
> Can you ktrace it and see what it is trying to do?
>=20
> christos

This is part of the trace. It was obtained sending an INT signal to the ppp
process in -ddial mode.

 13229 ppp      sendto(0x4, 0xbfbfdd20, 0x42, 0, 0, 0) =3D 66
       "<30>Jan 19 00:17:12 ppp[13229]: tun0: IPCP:  IPADDR[6]  10.52.0.3\n"
 13229 ppp      gettimeofday(0xbfbfda28, 0)        =3D 0
 13229 ppp      getpid()                           =3D 13229
 13229 ppp      sendto(0x4, 0xbfbfdea0, 0x56, 0, 0, 0) =3D 86
       "<30>Jan 19 00:17:12 ppp[13229]: tun0: IPCP: deflink: State change A=
ck-Rcvd --> Opened\n"
 13229 ppp      __sigprocmask14(0x1, 0xbfbfe7c0, 0xbfbfe7b0) =3D 0
 13229 ppp      __sigprocmask14(0x3, 0xbfbfe7e0, 0xbfbfe7d0) =3D 0
 13229 ppp      gettimeofday(0xbfbfda18, 0)        =3D 0
 13229 ppp      getpid()                           =3D 13229
 13229 ppp      sendto(0x4, 0xbfbfde90, 0x3e, 0, 0, 0) =3D 62
       "<30>Jan 19 00:17:12 ppp[13229]: tun0: IPCP: deflink: LayerUp.\n"
 13229 ppp      gettimeofday(0xbfbfda18, 0)        =3D 0
 13229 ppp      getpid()                           =3D 13229
 13229 ppp      sendto(0x4, 0xbfbfde90, 0x55, 0, 0, 0) =3D 85
       "<30>Jan 19 00:17:12 ppp[13229]: tun0: IPCP: myaddr 200.28.11.164 hi=
saddr =3D 10.52.0.3\n"
 13229 ppp      seteuid(0)                         =3D 0
 13229 ppp      socket(0x2, 0x2, 0)                =3D 1
 13229 ppp      seteuid(0)                         =3D 0
 13229 ppp      seteuid(0)                         =3D 0
 13229 ppp      ioctl(0x1, SIOCDIFADDR, 0xbfbfe720) =3D 0
       "tun0\0\0\0\0\0\0\0\0\0\0\0\0\^P\^B\0\0\M-H\^\\vp\0\0\0\0\0\0\0\0"
 13229 ppp      seteuid(0)                         =3D 0
 13229 ppp      seteuid(0)                         =3D 0
 13229 ppp      ioctl(0x1, SIOCAIFADDR, 0xbfbfe720) =3D 0
       "tun0\0\0\0\0\0\0\0\0\0\0\0\0\^P\^B\0\0\M-H\^\\vp\0\0\0\0\0\0\0\0\^P=
\^B\0\0\M^?\M^?\M^?\M^?\0\0\0\0\0\0\0\0\^P\^B\0\0\M^?\M^?\M^?\M^?\0\0\0\0\0=
\0\0\0"
 13229 ppp      seteuid(0)                         =3D 0
 13229 ppp      seteuid(0)                         =3D 0
 13229 ppp      ioctl(0x1, SIOCAIFADDR, 0xbfbfe720) =3D 0
       "tun0\0\0\0\0\0\0\0\0\0\0\0\0\^P\^B\0\0\M-H\^\\v\M-$\0\0\0\0\0\0\0\0=
\^P\^B\0\0\n4\0\^C\0\0\0\0\0\0\0\0\^P\^B\0\0\M^?\M^?\M^?\0\0\0\0\0\0\0\0\0"
 13229 ppp      seteuid(0)                         =3D 0
 13229 ppp      close(0x1)                         =3D 0
 13229 ppp      seteuid(0)                         =3D 0
 13229 ppp      socket(0x2, 0x2, 0)                =3D 1
 13229 ppp      seteuid(0)                         =3D 0
 13229 ppp      seteuid(0)                         =3D 0
 13229 ppp      ioctl(0x1, SIOCDIFADDR, 0xbfbfe700) =3D 0
       "tun0\0\0\0\0\0\0\0\0\0\0\0\0\^P\^B\0\0\M-H\^\\vp\0\0\0\0\0\0\0\0"
 13229 ppp      seteuid(0)                         =3D 0
 13229 ppp      close(0x1)                         =3D 0
 13229 ppp      seteuid(0)                         =3D 0
 13229 ppp      socket(0x11, 0x3, 0)               =3D 1
 13229 ppp      seteuid(0)                         =3D 0
 13229 ppp      getpid()                           =3D 13229
 13229 ppp      seteuid(0)                         =3D 0
 13229 ppp      write(0x1, 0xbfbfe690, 0x7c)       Err#17 EEXIST
 13229 ppp      seteuid(0)                         =3D 0
 13229 ppp      seteuid(0)                         =3D 0
 13229 ppp      write(0x1, 0xbfbfe690, 0x7c)       Err#59 ETOOMANYREFS

Every time userppp reconnects itself (the process doesn't die), it can't=20
overwrite the default route. If the route is deleted manually (route delete=
=20
default), and the INT signal is sent, the program writes the route properly=
.=20
If the process is killed and started again, the default route can be set.

The 'add! default HISADDR' command in the ppp.conf file doesn't overwrite t=
he=20
default route, even if the peer has the same IP.

C=E9sar