Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Apr 2003 11:26:24 -0400 (EDT)
From:      Robert Watson <rwatson@freebsd.org>
To:        Martin Blapp <mb@imp.ch>
Cc:        freebsd-net@freebsd.org
Subject:   Re: Implementing SO_BINDTODEVICE
Message-ID:  <Pine.NEB.3.96L.1030428112253.21738L-100000@fledge.watson.org>
In-Reply-To: <20030418193305.S6156@cvs.imp.ch>

next in thread | previous in thread | raw e-mail | index | archive | help

On Fri, 18 Apr 2003, Martin Blapp wrote:

> How difficult would it be to implement SO_BINDTODEVICE on FreeBSD ? I
> need the to make is possible to run more than one instance of dhclient
> on one host with more than one NIC. 
> 
> We would need this to support removable devices properly. 
> 
> There is a tool called omshell which should be able to change variables
> so the interface is added to the lists.  Unfortunatly the documentation
> is bad and I only found hooks to dhcpd. 

Hmm.  My impression was that dhclient used solely BPF descriptors on
FreeBSD to perform interface-specific DHCP client communications, and that
SO_BINDTODEVICE was used only in the DHCP server?  BPF requires you to
specifically identify an interface to bind to, as it's an interface-layer
communications primitive.

Last time I tried, the only real issue in using dhclient on multiple
interfaces was making sure that pid files didn't collide, but that was
several years ago, things could easily have changed.

What semantics does SO_BINDTODEVICE offer?  Normally, IP sockets make IP
address binding and routing decisions based on the process optionally
specifying IP addresses for local binding, and based on the destination of
a connection/transmission.

Robert N M Watson             FreeBSD Core Team, TrustedBSD Projects
robert@fledge.watson.org      Network Associates Laboratories




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.96L.1030428112253.21738L-100000>