Problem of source address when route changes

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

 



Hello,

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.

Thanks in advance.

---


-
: 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