SO_BINDTODEVICE and ipv6
John Newlin
jnewlin at google.com
Thu May 29 14:21:18 UTC 2014
In socket.c SO_BINDTODEVICE is not used for ipv6. Is there any reason this
isn't used for ipv6?
Our system has two interfaces we want to run dhclient on, and this is
causing issues as the dhcpv6 Reply is going to the wrong instance of
dhclient. Before I change it, I'd like to know the rationale for disabling
it for ipv6.
Cheers
// socket.c relevant code.
#if defined(SO_BINDTODEVICE)
/* Bind this socket to this interface. */
if ((local_family != AF_INET6) && (info->ifp != NULL) &&
setsockopt(sock, SOL_SOCKET, SO_BINDTODEVICE,
(char *)(info -> ifp), sizeof(*(info -> ifp))) < 0)
{
log_fatal("setsockopt: SO_BINDTODEVICE: %m");
}
#endif
-john
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20140529/e59019d5/attachment.html>
More information about the dhcp-users
mailing list