>SO_BINDTODEVICE only allow you to choose device among the different routing priorities.".Hi
In the previous message, I have asked "it is said to use SO_BINDTODEVICE, you still need to have a route pointing to the device.
> So if I send a packet to 127.0.0.1, will it be routed to lo, even if I have previously binded the socket to eth0?
No, it wont. What SO_BINDTODEVICE means is: "pick a route that goes via the specified device.". You can have several routes going out through the same device, and you msut swet up at least one such route but they are all limited to going via the specified device.
-- Gilad Ben-Yossef <gilad@codefidence.com> Codefidence. A name you can trust(tm) Web: http://codefidence.com | SIP: gilad@pbx.codefidence.com Tel: +972.9.8650475 ext. 201 | Fax: +972.9.8850643
"I am Jack's Overwritten Stack Pointer" -- Hackers Club, the movie
- : 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