netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: brian.haley@hp.com
Cc: xemul@parallels.com, eric.dumazet@gmail.com, netdev@vger.kernel.org
Subject: Re: [PATCH v2 net-next] sockopt: Change getsockopt() of SO_BINDTODEVICE to return an interface name
Date: Tue, 20 Nov 2012 13:58:42 -0500 (EST)	[thread overview]
Message-ID: <20121120.135842.249477087130415954.davem@davemloft.net> (raw)
In-Reply-To: <50A6A8FB.3050901@hp.com>

From: Brian Haley <brian.haley@hp.com>
Date: Fri, 16 Nov 2012 15:58:35 -0500

> 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.
> 
> Added a seqlock to protect this code path, and dev_ifname(), from someone
> changing the device name via dev_change_name().
> 
> v2: Added seqlock protection while copying device name.
> 
> Signed-off-by: Brian Haley <brian.haley@hp.com>

Brian I was going to apply this, but something about how you email
patches results in them being corrupted.

Go to:

http://patchwork.ozlabs.org/patch/199732/

Click on Download "mbox", and try to apply that to the net-next tree
to see what I mean.

  parent reply	other threads:[~2012-11-20 18:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-16 20:58 [PATCH v2 net-next] sockopt: Change getsockopt() of SO_BINDTODEVICE to return an interface name Brian Haley
2012-11-17  5:06 ` Pavel Emelyanov
2012-11-17 21:58   ` Brian Haley
2012-11-20 18:58 ` David Miller [this message]
2012-11-26 15:10   ` 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=20121120.135842.249477087130415954.davem@davemloft.net \
    --to=davem@davemloft.net \
    --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).