lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 28 Aug 2015 20:06:17 +0900
From:	Toshiaki Makita <toshiaki.makita1@...il.com>
To:	Nikolay Aleksandrov <nikolay@...ulusnetworks.com>,
	Toshiaki Makita <makita.toshiaki@....ntt.co.jp>
CC:	netdev@...r.kernel.org, bridge@...ts.linux-foundation.org,
	"David S . Miller" <davem@...emloft.net>
Subject: Re: [Bridge] [PATCH net-next] bridge: Add netlink support for vlan_protocol
 attribute

On 15/08/28 (金) 0:48, Nikolay Aleksandrov wrote:
>
>> On Aug 26, 2015, at 11:00 PM, Toshiaki Makita <makita.toshiaki@....ntt.co.jp> wrote:
>>
>> This enables bridge vlan_protocol to be configured through netlink.
>>
>> When CONFIG_BRIDGE_VLAN_FILTERING is disabled, kernel behaves the
>> same way as this feature is not implemented.
>>
>> Signed-off-by: Toshiaki Makita <makita.toshiaki@....ntt.co.jp>
>> ---
>> include/uapi/linux/if_link.h |  1 +
>> net/bridge/br_netlink.c      | 34 ++++++++++++++++++++++++++++++++++
>> net/bridge/br_private.h      |  1 +
>> net/bridge/br_vlan.c         | 35 +++++++++++++++++++++--------------
>> 4 files changed, 57 insertions(+), 14 deletions(-)
>>
>
> Nice, looks good. I have a similar patch as well and was going to ask wouldn’t it be
> better to make empty stubs which return an error when vlan filtering isn’t configured
> and drop the ifdefs in the netlink handling code ?
> Similar to how vlan_filtering netlink attribute is handled in commit:
> a7854037da00 ("bridge: netlink: add support for vlan_filtering attribute”)
>
> Potential problem would be the return of the protocol, but I think if 0 is returned that
> can be handled.

This is the exact reason why I didn't implement the stub.
I wanted to avoid to charge userspace with that special casing 0.
Also, this is consistent with sysfs implementation, which doesn't expose 
vlan_* entries when CONFIG_BRIDGE_VLAN_PROTOCOL is disabled.

Toshiaki Makita
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ