Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 07 Nov 2000 21:24:17 -0500
From:      "Louis A. Mamakos" <louie@TransSys.COM>
To:        Thomas Moestl <tmoestl@gmx.net>
Cc:        freebsd-net@FreeBSD.ORG
Subject:   Re: setting source address for UDP packets 
Message-ID:  <200011080224.eA82OHG61786@whizzo.transsys.com>
In-Reply-To: Your message of "Wed, 08 Nov 2000 00:32:54 %2B0100." <20001108003253.A5469@forge.local> 
References:  <20001107214749.A2125@forge.local> <200011072156.QAA87433@khavrinen.lcs.mit.edu> <20001108003253.A5469@forge.local> 

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

Take a look at the code for the NTP daemon.  Simply, it creates and
bind()'s a socket for each interface address associated with a 
multi-homed host (original application) or "alias" address.  It then
remembers what socket a query arrived on, and replies using the
same socket to ensure the source address of the reply matches what
the query was sent to.  This is required to make the NTP protocol work.

Yes, it's sort of a crock, but for typical hosts with only a few
network interfaces/addresses, is probably workable.

louie



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200011080224.eA82OHG61786>