On 31 Mär, 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 discarded
>> >> 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).
>> >>
>> > OK, finally got it. When the interface goes down, the address is still
>> > valid, and there is no reason to delete (static?) routes that use this
>> > address, but the new code does. I was confused by the code comment below
>>
>> I didn't have a static IP address. The only static thing in this context
>> is the interface the defaultroute is assigned to. At every
>> dial-on-demand I get another IP.
>>
> 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=a010<POINTOPOINT,LINK1,MULTICAST> mtu 1500
inet 0.0.0.0 --> 0.0.0.1 netmask 0xffff0000
ether 00:00:00:00:00:00
(4) netchild@ttyp1 % netstat -rn
Routing tables
Internet:
Destination Gateway Flags Refs Use Netif Expire
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 =>
(5) netchild@ttyp1 % isdn-up # this is a SUID wrapper for "ifconfig isp1 up"
(6) netchild@ttyp1 % ifconfig isp1
isp1: flags=a011<UP,POINTOPOINT,LINK1,MULTICAST> mtu 1500
inet 0.0.0.0 --> 0.0.0.1 netmask 0xffff0000
ether 00:00:00:00:00:00
(7) netchild@ttyp1 % netstat -rn
Routing tables
Internet:
Destination Gateway Flags Refs Use Netif Expire
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 =>
---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.
--
Actually, Microsoft is sort of a mixture between the Borg and the Ferengi.
http://www.Leidinger.net Alexander @ Leidinger.net
GPG fingerprint = C518 BC70 E67F 143F BE91 3365 79E2 9C60 B006 3FE7
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-net" in the body of the message