Subject: Re: Strange UDP binding behavior (SO_BINDTODEVICE)

From: Kevin Dwyer <[email-masked]>
Date: Mon, 6 Oct 2003 21:06:00 -0400

On Mon, 06 Oct 2003 17:50:53 -0500
Casey Carter <[email-masked]> wrote:

> This is not a bug, it's a feature!  It is possible to use multiple 
> sockets with the same port number bound to different interfaces (where
> "no interface" is one possible choice).  The UDP packet delivery code 
> favors the socket that is bound to the interface through which packets
> are received. So, if I am only interested in packets for port 6666 on 
> eth1, then I am prioritized ahead of the socket bound to "no
> interface" port 6666.  

Well, I would buy that as reasonable, acceptable behavior, but I think
the reverse is true.

We are binding specifically to say, eth0 on port 694.  Someone comes
along and binds to "no interface" on port 694 and trumps our socket. 
Isn't that the opposite of what you describe?

-- 
- kpd
"If at first you don't succeed, redefine success." - Anonymous