Re: [Bugme-new] [Bug 7665] New: getsockopt(IPV6_*CAST_HOPS) returns -1

2006-12-13 Thread Brian Haley
David Miller wrote: I wonder, since the most accurate return value is tied to the route, what is expected of this getsockopt() before a socket's identity (and therefore route) is known? A search for RTAX_HOPLIMIT found very little code that ever sets it, iproute2 was the only important one,

Re: Fw: [Bugme-new] [Bug 7665] New: getsockopt(IPV6_*CAST_HOPS) returns -1

2006-12-12 Thread Rémi Denis-Courmont
Hello, Le lundi 11 décembre 2006 22:55, Brian Haley a écrit : 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

Re: [Bugme-new] [Bug 7665] New: getsockopt(IPV6_*CAST_HOPS) returns -1

2006-12-12 Thread David Miller
From: Brian Haley [EMAIL PROTECTED] Date: Tue, 12 Dec 2006 16:16:27 -0500 The following patch seems to work for me, but this code has behaved this way for a while, so don't know if it will break any existing apps. Signed-off-by: Brian Haley [EMAIL PROTECTED] I like this patch so I have

Fw: [Bugme-new] [Bug 7665] New: getsockopt(IPV6_*CAST_HOPS) returns -1

2006-12-11 Thread Andrew Morton
Begin forwarded message: Date: Mon, 11 Dec 2006 07:18:20 -0800 From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [Bugme-new] [Bug 7665] New: getsockopt(IPV6_*CAST_HOPS) returns -1 http://bugzilla.kernel.org/show_bug.cgi?id=7665 Summary: getsockopt(IPV6_*CAST_HOPS) returns -1

Re: Fw: [Bugme-new] [Bug 7665] New: getsockopt(IPV6_*CAST_HOPS) returns -1

2006-12-11 Thread Brian Haley
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