You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/net-misc/dhcp/files/dhcp-4.2.5-bindtodevice-ine...

20 lines
826 B

https://bugs.gentoo.org/471142
snipped from fedora
# dhclient -6: bind socket to interface (#1001742)
# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #34784])
diff -up dhcp-4.2.5/common/socket.c.bindtodevice_inet6 dhcp-4.2.5/common/socket.c
--- dhcp-4.2.5/common/socket.c.bindtodevice_inet6 2013-09-17 16:47:05.000000000 +0200
+++ dhcp-4.2.5/common/socket.c 2013-09-17 16:48:18.975997842 +0200
@@ -245,7 +245,7 @@ if_register_socket(struct interface_info
#if defined(SO_BINDTODEVICE)
/* Bind this socket to this interface. */
- if ((local_family != AF_INET6) && (info->ifp != NULL) &&
+ if (((do_multicast == 0)||(*do_multicast == 0)) && (info->ifp != NULL) &&
setsockopt(sock, SOL_SOCKET, SO_BINDTODEVICE,
(char *)(info -> ifp), sizeof(*(info -> ifp))) < 0) {
log_fatal("setsockopt: SO_BINDTODEVICE: %m");