netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rémi Denis-Courmont" <rdenis@simphalempin.com>
To: Brian Haley <brian.haley@hp.com>
Cc: Andrew Morton <akpm@osdl.org>,
	netdev@vger.kernel.org, David Miller <davem@davemloft.net>
Subject: Re: Fw: [Bugme-new] [Bug 7665] New: getsockopt(IPV6_*CAST_HOPS) returns -1
Date: Tue, 12 Dec 2006 23:38:24 +0100	[thread overview]
Message-ID: <200612122338.24592@auguste.remlab.net> (raw)
In-Reply-To: <457F1C2B.9000800@hp.com>

Le mardi 12 décembre 2006 22:16, vous avez écrit :
> > I don't reckon -1 could be the hop limit value.
>
> -1 means un-initialized.

Sure, -1 means "kernel default" for setsockopt(), but it is not 
specified for getsockopt().

> 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.

Google Codesearch for "getsockopt IPV6_MULTICAST_HOPS" yields a bunch of 
apps that seem to assume a valid hop limit is returned, none of which 
detects -1. I believe applying your patch would fix much more apps than 
it is going to break. Hopefully those not handling -1 will somehow cast 
it to 255 if it is ever re-used, but I can also imagine some broken 
SDP-or-similar with "/-1" or "/4294967295" as a hop limit.

Thanks,

-- 
Rémi Denis-Courmont

  reply	other threads:[~2006-12-12 22:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-11 17:56 Fw: [Bugme-new] [Bug 7665] New: getsockopt(IPV6_*CAST_HOPS) returns -1 Andrew Morton
2006-12-11 21:55 ` Brian Haley
2006-12-12  8:08   ` Rémi Denis-Courmont
2006-12-12 21:16     ` Brian Haley
2006-12-12 22:38       ` Rémi Denis-Courmont [this message]
2006-12-13  1:11       ` David Miller
2006-12-13 17:28         ` Brian Haley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200612122338.24592@auguste.remlab.net \
    --to=rdenis@simphalempin.com \
    --cc=akpm@osdl.org \
    --cc=brian.haley@hp.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).