With asymmetric routing (e.g. with BGP) it may not be possible to
respond to a request using the same interface. In such case, setting the
interface index in IP*_PKTINFO* causes the packet to be silently dropped
by the kernel.
Until we can predict if sending with the specified interface will
succeed, or provide only a hint, don't set the interface and leave it
to the kernel to select an interface.
This reverts commit
5fc7674e366f ("ntp: set interface index in
IP*_PKTINFO when responding").
Reported-by: Arkadiusz MiĆkiewicz <arekm@maven.pl>
return 0;
ipi->ipi_spec_dst.s_addr = htonl(message->local_addr.ip.addr.in4);
- if (message->if_index != INVALID_IF_INDEX)
- ipi->ipi_ifindex = message->if_index;
#elif defined(IP_SENDSRCADDR)
struct in_addr *addr;
memcpy(&ipi->ipi6_addr.s6_addr, &message->local_addr.ip.addr.in6,
sizeof(ipi->ipi6_addr.s6_addr));
- if (message->if_index != INVALID_IF_INDEX)
- ipi->ipi6_ifindex = message->if_index;
}
#endif
}