[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <50B52431.5090800@parallels.com>
Date: Wed, 28 Nov 2012 00:36:01 +0400
From: Pavel Emelyanov <xemul@...allels.com>
To: Brian Haley <brian.haley@...com>
CC: David Miller <davem@...emloft.net>,
Eric Dumazet <eric.dumazet@...il.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH v3 net-next] sockopt: Change getsockopt() of SO_BINDTODEVICE
to return an interface name
On 11/26/2012 07:21 PM, Brian Haley wrote:
> 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.
>
> v3: Fixed word wrap in patch.
>
> Signed-off-by: Brian Haley <brian.haley@...com>
Acked-by: Pavel Emelyanov <xemul@...allels.com>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists