Andrew Morton wrote:
Where fd is a socket (datagram or raw) with IPv6 protocol family,
getsockopt(fd, IPPROTO_IPV6, IPV6_UNICAST_HOPS, ...) succeeds, but the returned
hop limit is -1. connect()'ing the socket first does not solve the problem.
An IPv6 socket's hoplimit value is not set at creation time, instead,
the hoplimit in an outgoing packet is set dynamically at transmit time
to one of the following (in this order):
1. Hoplimit route metric (if set)
2. Outgoing interface value (/proc/sys/net/ipv6/conf/ethX/hop_limit)
3. Global IPv6 value (/proc/sys/net/ipv6/conf/all/hop_limit)
A setsockopt() value *will* override this.
Some *nixes have a different behavior and do set it at socket() creation
time.
-Brian
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html