On 3 Apr, Ruslan Ermilov wrote:
> On Tue, Apr 03, 2001 at 04:13:27PM +0200, Alexander Leidinger wrote:
>> On 2 Apr, Ruslan Ermilov wrote:
>>
>> > OK, we fixed the "ifconfig down" case already. The attached patch alters
>> > inet routing code so that it does not delete routes with the "default"
>> > source address of 0.0.0.0; ip_output() will take care of choosing the
>> > right address. Please let me know if it works for you.
>>
>> I reverted your "#if 0" patch (which worked for me) and applied this
>> patch: no, didn't works, the route vanishes.
>>
> Nope, you should not have been reverting the "#if 0" patch, you should
> have used both.
Oh, ok.
> The "#if 0" patch, like you called it, fixed the case when the route
> disappeared on ``ifconfig down''. Right?
With only the "#if 0" patch, everything worked as bevore the commit.
> If I understood you correctly, the route still disappeared after a
> new IP address was negotiated with the peer. The last patch is a
No.
> special hack for routes with the "default" (0.0.0.0) address; the
> routing code will not delete such routes. Or did I misunderstood
> something, and negotiated IP address is added as an alias address
> to an interface? How does the ``ifconfig'' output looks after
> the IP address is negotiated? (If the new address is an alias
> address, then the second patch is not required.)
This is the output with only the second patch applied and a connection
to my ISP:
---snip---
(10) root@ttyp2 # route -vn get default
u: inet 0.0.0.0; u: inet 0.0.0.0; u: link ; RTM_GET: Report Metrics: len 168, pid: 0,
seq 1, errno 0, flags:<UP,GATEWAY,STATIC>
locks: inits:
sockaddrs: <DST,NETMASK,IFP>
default default
route to: default
destination: default
mask: default
interface: isp1
flags: <UP,DONE,STATIC,PRCLONING>
recvpipe sendpipe ssthresh rtt,msec rttvar hopcount mtu expire
0 0 0 0 0 0 1500 0
locks: inits:
sockaddrs: <DST,GATEWAY,NETMASK,IFP,IFA>
default isp1:0.0.0.0.0.0 default isp1:0.0.0.0.0.0 213.6.59.66
(11) root@ttyp2 # ifconfig isp1
isp1: flags=a051<UP,POINTOPOINT,RUNNING,LINK1,MULTICAST> mtu 1500
inet 213.6.59.66 --> 0.0.0.1 netmask 0xffff0000
ether 00:00:00:00:00:00
(13) root@ttyp2 # netstat -rn
Routing tables
Internet:
Destination Gateway Flags Refs Use Netif Expire
default 0:0:0:0:0:0 USc 30 2 isp1
0.0.0.1 213.6.59.66 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 14817 lo0
192.168.1 link#1 UC 0 0 ed0 =>
---snip---
Bye,
Alexander.
--
Loose bits sink chips.
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