Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Apr 2001 18:52:00 +0200 (CEST)
From:      Alexander Leidinger <Alexander@Leidinger.net>
To:        ru@FreeBSD.org
Cc:        net@FreeBSD.org, isdn@freebsd.org
Subject:   Re: Recent interface/routing changes breaks on-demand PPP (+sppp)
Message-ID:  <200104021652.f32Gq1I02500@Magelan.Leidinger.net>
In-Reply-To: <20010331204534.B11966@sunbay.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 31 M=E4r, Ruslan Ermilov wrote:

[-isdn CCed,]

Dear -isdn readers, we are talking about the actual behavior of
-current, see -current and -net for the beginning of the discussion.

>> >> If I use
>> >>   route add default -interface isp1
>> >> I wan't to have the packets routed trough isp1. I don't care about =
how
>> >> the routing table is held consistent, but I if the route is discard=
ed
>> >> without my interaction it not only violates POLA, in this case it's
>> >> prohibits a valid use of the -interface feature (dial on demand via=
 sppp
>> >> is broken at the moment).
>> >>=20
>> > OK, finally got it.  When the interface goes down, the address is st=
ill
>> > valid, and there is no reason to delete (static?) routes that use th=
is
>> > address, but the new code does.  I was confused by the code comment =
below
>>=20
>> I didn't have a static IP address. The only static thing in this conte=
xt
>> is the interface the defaultroute is assigned to. At every
>> dial-on-demand I get another IP.
>>=20
> Well, if address is deleted from an interface, all routes that use it
> will be invalidated (deleted) to avoid using the wrong address.  This
> patch only fixes interface down/up case, when address does not change.

If "isp1" is a valid address in this context: it doesn't change.

Here a little bit of cut&paste (your "#if 0" patch is applied)
which perhaps gives you a hint what I have here:
---snip---
(3) netchild@ttyp1 % ifconfig isp1
isp1: flags=3Da010<POINTOPOINT,LINK1,MULTICAST> mtu 1500
        inet 0.0.0.0 --> 0.0.0.1 netmask 0xffff0000=20
        ether 00:00:00:00:00:00

(4) netchild@ttyp1 % netstat -rn
Routing tables

Internet:
Destination        Gateway            Flags     Refs     Use     Netif Ex=
pire
default            0:0:0:0:0:0        USc         0        1     isp1
0.0.0.1            0.0.0.0            UH          0        0     isp1
127.0.0.1          127.0.0.1          UH          2     4613      lo0
192.168.1          link#1             UC          1        0      ed0 =3D=
>

(5) netchild@ttyp1 % isdn-up   # this is a SUID wrapper for "ifconfig isp=
1 up"

(6) netchild@ttyp1 % ifconfig isp1
isp1: flags=3Da011<UP,POINTOPOINT,LINK1,MULTICAST> mtu 1500
        inet 0.0.0.0 --> 0.0.0.1 netmask 0xffff0000=20
        ether 00:00:00:00:00:00=20

(7) netchild@ttyp1 % netstat -rn =20
Routing tables

Internet:
Destination        Gateway            Flags     Refs     Use     Netif Ex=
pire
default            0:0:0:0:0:0        USc         0        1     isp1
0.0.0.1            0.0.0.0            UH          0        0     isp1
0.0.0.2            0.0.0.0            UH          0        0     isp0
127.0.0.1          127.0.0.1          UH          2     4613      lo0
192.168.1          link#1             UC          1        0      ed0 =3D=
>
---snip---

isp1 gets a new IP address after the ppp negotiation of sppp/isdnd.
0.0.0.0 -> 0.0.0.1 uses a documented hack in the i4b stack which
discards the first packet to don't let go a packet with a wrong address
(0.0.0.0) out of the computer. After a timeout or an "ifconfig isp1
down" it hangs up and the dynamic IP address of isp1 get's replaced by
0.0.0.0 again. The actual behavior of -current breaks the documented way
of enabling dial-on-demand with sppp/isdnd.
(To -isdn readers: after the first "ifconfig isp1 down" the defaultroute
vanishes, after a manual "route add default -interface isp1" the route
stays even with subsequent "ifconfig isp1 down", doing an additional
"route add ..." is annoying, needs additional privileges and violates
POLA)

Bye,
Alexander.

--=20
Actually, Microsoft is sort of a mixture between the Borg and the Ferengi.

http://www.Leidinger.net                       Alexander @ Leidinger.net
  GPG fingerprint =3D C518 BC70 E67F 143F BE91  3365 79E2 9C60 B006 3FE7


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-isdn" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200104021652.f32Gq1I02500>