• Jonathan T. Leighton's avatar
    ipv6: Handle IPv4-mapped src to in6addr_any dst. · 052d2369
    Jonathan T. Leighton authored
    This patch adds a check on the type of the source address for the case
    where the destination address is in6addr_any. If the source is an
    IPv4-mapped IPv6 source address, the destination is changed to
    ::ffff:127.0.0.1, and otherwise the destination is changed to ::1. This
    is done in three locations to handle UDP calls to either connect() or
    sendmsg() and TCP calls to connect(). Note that udpv6_sendmsg() delays
    handling an in6addr_any destination until very late, so the patch only
    needs to handle the case where the source is an IPv4-mapped IPv6
    address.
    Signed-off-by: default avatarJonathan T. Leighton <jtleight@udel.edu>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    052d2369
udp.c 36.8 KB