From: Dan L. <da...@st...> - 2002-09-24 15:34:41
|
libASL users, I am having a strange problem with packets getting sent from an IP address that is assigned to a network interface on my machine even when it is down. My configuration is as follows: eth0 - wired ethernet, configured for 192.168.1.140 eth1 - 802.11b card, configured for 10.1.1.2 Ok, I can explicitly bring down the eth0 interface with `/sbin/ifconfig eth0 down`. Now, eth0 does not appear in the list of interfaces when I do an `/sbin/ifconfig`. Then I ping some address as follows: # ping 10.2.3.4 [root@localhost libASL]# ping 10.2.3.4 PING 10.2.3.4 (10.2.3.4) from 10.1.1.2 : 56(84) bytes of data. From 10.1.1.2 icmp_seq=1 Destination Host Unreachable From 10.1.1.2 icmp_seq=2 Destination Host Unreachable From 10.1.1.2 icmp_seq=3 Destination Host Unreachable --- 10.2.3.4 ping statistics --- 4 packets transmitted, 0 received, +3 errors, 100% loss, time 3028ms Ok, thats what I want. Note that the ping is coming from 10.1.1.2 (my wireless interface) which is what I want. Now I start up my ad-hoc routing daemon on eth1. I do a `/sbin/ifconfig`: [root@localhost libASL]# /sbin/ifconfig eth1 Link encap:Ethernet HWaddr 00:02:2D:05:58:22 inet addr:10.1.1.2 Bcast:10.255.255.255 Mask:255.0.0.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:24 errors:1 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:0 (0.0 b) TX bytes:3200 (3.1 Kb) Interrupt:5 Base address:0x100 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:58 errors:0 dropped:0 overruns:0 frame:0 TX packets:58 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:5610 (5.4 Kb) TX bytes:5610 (5.4 Kb) tun Link encap:Point-to-Point Protocol inet addr:127.0.0.2 P-t-P:127.0.0.2 Mask:255.255.255.255 UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:10 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) Note the tun interface is up as well as the wireless interface, but not eth0. Now I try doing the same ping that I did before. I expect the result to be the same, except that I get activity on the ASL socket letting my routing daemon know of a route request. Here is the ping: [root@localhost libASL]# ping 10.2.3.4 PING 10.2.3.4 (10.2.3.4) from 192.168.1.140 : 56(84) bytes of data. --- 10.2.3.4 ping statistics --- 4 packets transmitted, 0 received, 100% loss, time 3014ms There it is. I do get the activity on the ASL socket, but as you can see, the ping is from "192.168.1.140", which is the IP of eth0, which is down. This obviously causes a problem because the routing daemon thinks its IP is "10.1.1.2" and won't think this request for a route was generated locally. Does anyone have any reason why this happens? Is this an issue with libASL or the way I am doing something in my routing daemon? |