On Sun, Apr 30, 2006 at 11:17:11AM +0200, Lennert Buytenhek wrote:
> 
> A fragile and ugly but easier/shorter way of getting the source address
> (which I've used a couple of times in the past) is to open a SOCK_DGRAM
> socket, connect() it to the intended destination, and then do
> getsockname().

Yes you're quite right that this would've been a much simpler solution.
I suppose I was quite fond of the netlink hammer at the time :)
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to