RE: Problem of source address when route changes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> I'm trying to use diald with ippp. My setup almost works 
> correctly except
> a very boring problem (I'm using kernel 2.4.17).
> 
> For diald to work, the default route is set on the sl0 interface (slip
> interface where diald is listening). When diald detects a 
> correct packet, it
> activates the ppp layer and the ippp0 (isdn ppp) goes up. 
> When the ippp0
> interface goes up, the default route is set to it.
> 
> The problem is the following:
> - I ping an.ip.add.ress
> - diald sees the packet and activates the ippp0 interface, 
> and changes the route
> to ippp0
> - ping prints
> ping: sendto: Invalid argument
> ping: sendto: Invalid argument
> ping: sendto: Invalid argument
> ...
> 
> - I kill ping and restart another one, everything is OK.
> 
> I've tried to see what happens when you are switching routes when an
> application is running. And used the following test:
> 
> # run tcpdump -i dummy0 and tcpdump eth0 in other windows
> 
> $ DEST=an.ip.add.rres
> $ GW=my_gateway_on_my_eth0
> 
> $ ifconfig dummy0 10.2.3.4 netmask 255.255.255.0 up
> $  route add $DEST dummy0
> $ ping $DEST
> -> packets are there, source address from dummy0
> # do not kill the ping !!!
> $ route delete $DEST dummy0; route add $DEST gw $GW 
> -> packets change to eth0, but their source address is not 
> the one from
>    eth0, but the one from dummy0
> # kill the ping, restart it -> source address is now OK.
> 
> I thought the kernel whould have rewritten the source 
> address, when switching
> route.
> 
> Is there a solution or a workaround to this problem ?
> I use diald because I need complex rules and can't use the 
> automatic dialup
> feature of isdn.

I had the same problem with Kmail when I want to send an email (when you
read them it doesn't attach an IP to the request, so it doesn't get
confused).

I asked the Linux-users list about this and the response I got was that it
is a known bug, with no known work around that is simple.

My plan (not yet implemented) is to replace the send email command (you can
replace whatever command you have a problem with) with a script that will
ping first (to get the dial to happen), then send the email.  You might try
something along those lines.


In Harmony's Way, and In A Chord,

Tom  :-})

Thomas A. Condon
Barbershop Bass Singer
Registered Linux User #154358

-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux