I got no answer, so I resend my below described problem...
---------------------------------------
I am trying to bypass the routing table with Linux 2.2.9 using the
above mentioned mechanisms and cannot get it running.
I have two hosts (hosta, hostb) connected via local ethernet and on
one host (assume hosta) I do:
route add hostb lo
thus, redirecting all traffic from hosta to hostb to the loopback
device. Now, I send a UDP mex from hosta to hostb using the following
code:
setsockopt (socket, SOL_SOCKET, SO_DONTROUTE, &dontrouteval,
sizeof(int));
flags = MSG_DONTROUTE;
sendto(socket, "hello", 5, flags, (struct sockaddr *) &server,
sizeof(server));
In my understanding, the SO_DONTROUTE resp. the MSG_DONTROUTE should
result in the fact, that the kernel ignores the route to the loopback
device and instead sends the UDP mex directly to the ethernet device
with the IP-address/netmask pair that fits to the destination address
in the UDP packet. But, both methods do not work. Am I missing
something or are these mechanisms currently broken in the kernel?
(BTW: ping -r using the SO_DONTROUTE mechanism together with raw
sockets does not work either).
Any ideas?
Thanks in advance,
J"org
--- J"org Diederich Institute of Operating Systems and Computer Networks, Technical University Braunschweig, Germany e-mail: dieder@ibr.cs.tu-bs.de- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/