Re: Forcing a connection from a particular NIC

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

 



Xia Wei-Zhong-W20079 wrote:
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_BINDTODEVICE only allow you to choose device among the different routing priorities.".
> 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

[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