Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 08 Nov 2000 03:01:23 -0800
From:      Julian Elischer <julian@elischer.org>
To:        Luigi Rizzo <rizzo@aciri.org>
Cc:        Garrett Wollman <wollman@khavrinen.lcs.mit.edu>, tmoestl@gmx.net, freebsd-net@FreeBSD.ORG
Subject:   Re: setting source address for UDP packets
Message-ID:  <3A093283.48BE41D8@elischer.org>
References:  <200011072202.OAA03771@iguana.aciri.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Luigi Rizzo wrote:
> 
> > > is there any way to set the source address of an UDP (over IPv4) packet
> > > without using bind() or changing the socket state,
> >
> > No.  This is a long-standing bug.  It shouldn't be too hard to fix if
> > you're up to a bit of kernel hacking.
> 
> you mean by adding a sendto_from() system call where you also pass
> the address for the source ?
> Or [really dirty hack here] an extended sendto() where the sockaddr
> really points to an array of two addresses (with "tolen" set

well you could use divert sockets to send UDP packets
(bleah)

> accordingly) ?
> 
>         cheers
>         luigi
> ----------------------------------+-----------------------------------------
>  Luigi RIZZO, luigi@iet.unipi.it  . ACIRI/ICSI (on leave from Univ. di Pisa)
>  http://www.iet.unipi.it/~luigi/  . 1947 Center St, Berkeley CA 94704
>  Phone: (510) 666 2927
> ----------------------------------+-----------------------------------------
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-net" in the body of the message

-- 
      __--_|\  Julian Elischer
     /       \ julian@elischer.org
    (   OZ    ) World tour 2000
---> X_.---._/  presently in:  Budapest
            v


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?3A093283.48BE41D8>