netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: andi@firstfloor.org
Cc: brian.haley@hp.com, xemul@parallels.com, eric.dumazet@gmail.com,
	netdev@vger.kernel.org
Subject: Re: [PATCH net-next] sockopt: Change getsockopt() of SO_BINDTODEVICE to return an interface name
Date: Thu, 01 Nov 2012 10:52:28 -0400 (EDT)	[thread overview]
Message-ID: <20121101.105228.565623780714877960.davem@davemloft.net> (raw)
In-Reply-To: <m2wqy6jrne.fsf@firstfloor.org>

From: Andi Kleen <andi@firstfloor.org>
Date: Wed, 31 Oct 2012 13:47:01 -0700

> Brian Haley <brian.haley@hp.com> writes:
> 
>> Instead of having the getsockopt() of SO_BINDTODEVICE return an index, which
>> will then require another call like if_indextoname() to get the actual interface
>> name, have it return the name directly.
>>
>> This also matches the existing man page description on socket(7) which mentions
>> the argument being an interface name.
>>
>> If the value has not been set, zero is returned and optlen will be set to zero
>> to indicate there is no interface name present.
> 
> That will break all existing programs using the return value, right?
> Better to fix the manpage

It never returned a value before, you could not getsockopt() on
SO_BINDTODEVICE previously.

  parent reply	other threads:[~2012-11-01 14:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-31 20:06 [PATCH net-next] sockopt: Change getsockopt() of SO_BINDTODEVICE to return an interface name Brian Haley
2012-10-31 20:47 ` Andi Kleen
2012-11-01 14:02   ` Brian Haley
2012-11-01 14:52   ` David Miller [this message]
2012-11-02  9:36 ` Pavel Emelyanov
2012-11-02 10:23   ` Eric Dumazet
2012-11-02 15:02   ` Brian Haley
2012-11-02 23:34     ` Ben Hutchings
2012-11-06  4:01       ` Brian Haley
2012-11-08  0:23         ` Ben Hutchings
2012-11-08 15:36         ` Brian Haley
2012-11-08 20:02           ` David Miller

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=20121101.105228.565623780714877960.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=andi@firstfloor.org \
    --cc=brian.haley@hp.com \
    --cc=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=xemul@parallels.com \
    /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).