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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 12 Jun 2014 17:03:26 +0200
From:	Jiri Pirko <jiri@...nulli.us>
To:	Nicolas Dichtel <nicolas.dichtel@...nd.com>
Cc:	netdev@...r.kernel.org, davem@...emloft.net, pshelar@...ira.com,
	cwang@...pensource.com, ebiederm@...ssion.com,
	david@...son.dropbear.id.au, sfeldma@...ulusnetworks.com,
	sucheta.chakraborty@...gic.com, stephen@...workplumber.org
Subject: Re: [patch net-next] openvswitch: introduce rtnl ops stub

Thu, Jun 12, 2014 at 04:46:05PM CEST, nicolas.dichtel@...nd.com wrote:
>Le 12/06/2014 16:20, Jiri Pirko a écrit :
>>This stub now allows userspace to see IFLA_INFO_KIND for ovs master and
>>IFLA_INFO_SLAVE_KIND for slave.
>>
>>Note that I added ops->setup check into newlink and dellink in order to
>>prevent creating and deleting openvswitch instances using rtnl for now.
>>
>>Signed-off-by: Jiri Pirko <jiri@...nulli.us>
>net-next is closed ;-)
>
>>---
>>  net/core/rtnetlink.c                 |  5 ++++-
>>  net/openvswitch/datapath.c           |  9 ++++++++-
>>  net/openvswitch/vport-internal_dev.c | 16 ++++++++++++++++
>>  net/openvswitch/vport-internal_dev.h |  2 ++
>>  4 files changed, 30 insertions(+), 2 deletions(-)
>>
>>diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
>>index 233b5ae..b874139 100644
>>--- a/net/core/rtnetlink.c
>>+++ b/net/core/rtnetlink.c
>>@@ -1767,7 +1767,7 @@ static int rtnl_dellink(struct sk_buff *skb, struct nlmsghdr *nlh)
>>  		return -ENODEV;
>>
>>  	ops = dev->rtnl_link_ops;
>>-	if (!ops)
>>+	if (!ops || !ops->setup)
>>  		return -EOPNOTSUPP;
>>
>>  	ops->dellink(dev, &list_kill);
>>@@ -2028,6 +2028,9 @@ replay:
>>  			return -EOPNOTSUPP;
>>  		}
>>
>>+		if (!ops->setup)
>>+			return -EOPNOTSUPP;
>>+
>For this one, you could just add a ops->validate in openvswitch which returns
>always -EOPNOTSUPP.

yeah, I wanted the check in newlink and dellink to be the same
--
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