[lkml]   [2004]   [Jun]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: UDP sockets bound to ANY send answers with wrong src ip address


    On Wed, 9 Jun 2004, Denis Vlasenko wrote:

    > I observe that UDP sockets listening on ANY
    > send response packets with ip addr derived from
    > ip address of interface which is used to send 'em
    > instead of using dst ip address of client's packet.
    > I was bitten by this with DNS and NTP.

    The problem is in the apps. You have some options:

    - use sockets listening on ANY and using sendmsg with IP_PKTINFO
    and providing the desired src IP in ipi_spec_dst

    - you can also create many listener sockets listening on
    particular src IP and to reply using the socket where the
    request is received, because the kernel does not know any
    association between request and reply packets if the listener
    is bound to ANY.


    Julian Anastasov <>

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 14:03    [W:0.018 / U:1.128 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site