Skip to content
Commit f49ad35c authored by Dominik Paulus's avatar Dominik Paulus Committed by Greg Kroah-Hartman
Browse files

staging: usbip: Fix IPv6 support in usbipd



getaddrinfo() leaves the order of the returned addrinfo structs
unspecified. On systems with bindv6only disabled (this is the default),
PF_INET6 sockets bind to IPv4, too. Thus, IPv6 support in usbipd was
broken when getaddrinfo returned first IPv4 and then IPv6 addrinfos, as
the IPv6 bind failed with EADDRINUSE.

This patch uses seperate sockets for IPv4 and IPv6 and sets IPV6_V6ONLY
on all IPv6 sockets. Two command line arguments, -4 and -6 were added to
manually select the socket family.

Signed-off-by: default avatarTobias Polzer <tobias.polzer@fau.de>
Signed-off-by: default avatarDominik Paulus <dominik.paulus@fau.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 414ef695
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment