lkml.org 
[lkml]   [1999]   [Jun]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectGot no answer: 2.2.9: MSG_DONTROUTE / SO_DONTROUTE: still working??
Hi,

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/

\
 
 \ /
  Last update: 2005-03-22 13:52    [W:0.024 / U:1.472 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site