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:	Tue, 09 Jun 2015 20:13:14 -0400
From:	Thomas F Herbert <therbert@...hat.com>
To:	Pravin Shelar <pshelar@...ira.com>,
	Thomas F Herbert <thomasfherbert@...il.com>
CC:	netdev <netdev@...r.kernel.org>,
	"dev@...nvswitch.org" <dev@...nvswitch.org>
Subject: Re: [PATCH net-next V10 4/4] 8021AD: Flow key parsing and netlink
 attributes.



On 6/8/15 11:45 PM, Pravin Shelar wrote:
> On Tue, Jun 2, 2015 at 10:50 AM, Thomas F Herbert
> <thomasfherbert@...il.com> wrote:
>> Add support for 802.1ad to netlink parsing and flow conversation. Uses
>> double nested encap attributes to represent double tagged vlan.
>>
> This patch needs to be merged with earlier patch since it is part of
> qinq support.
>
>> Signed-off-by: Thomas F Herbert <thomasfherbert@...il.com>
>> ---
>>   net/openvswitch/flow_netlink.c | 186 ++++++++++++++++++++++++++++++++++-------
>>   1 file changed, 157 insertions(+), 29 deletions(-)
>>
>> diff --git a/net/openvswitch/flow_netlink.c b/net/openvswitch/flow_netlink.c
>> index c691b1a..8fd4f63 100644
>> --- a/net/openvswitch/flow_netlink.c
>> +++ b/net/openvswitch/flow_netlink.c
>> @@ -771,6 +771,28 @@ static int metadata_from_nlattrs(struct sw_flow_match *match,  u64 *attrs,
> ...
>>                  err = ovs_key_from_nlattrs(match, mask_attrs, a, true, log);
>> @@ -1331,6 +1439,25 @@ static int __ovs_nla_put_key(const struct sw_flow_key *swkey,
>>                  encap = nla_nest_start(skb, OVS_KEY_ATTR_ENCAP);
>>                  if (!swkey->eth.tci)
>>                          goto unencap;
>> +       } else if (swkey->eth.ctci || swkey->eth.type == htons(ETH_P_8021AD)) {
>> +               __be16 eth_type;
>> +
>> +               eth_type = !is_mask ? htons(ETH_P_8021AD) : htons(0xffff);
>> +               if (nla_put_be16(skb, OVS_KEY_ATTR_ETHERTYPE, eth_type) ||
>> +                   nla_put_be16(skb, OVS_KEY_ATTR_VLAN, output->eth.tci))
>> +                       goto nla_put_failure;
>> +               encap = nla_nest_start(skb, OVS_KEY_ATTR_ENCAP);
>> +               if (!swkey->eth.tci)
>> +                       goto unencap;
>> +               /* Customer tci is nested but uses same key attribute.
>> +                */
>> +               eth_type = !is_mask ? htons(ETH_P_8021Q) : htons(0xffff);
>> +               if (nla_put_be16(skb, OVS_KEY_ATTR_ETHERTYPE, eth_type) ||
>> +                   nla_put_be16(skb, OVS_KEY_ATTR_VLAN, output->eth.ctci))
>> +                       goto nla_put_failure;
>> +               encap = nla_nest_start(skb, OVS_KEY_ATTR_ENCAP);
>> +               if (!swkey->eth.ctci)
>> +                       goto unencap;
>>          } else
>>                  encap = NULL;
>>
> For qinq we need to keep track of two encap attributes to finalize
> nesting of attributes.
Thanks! This was an oversight on my part and I am fixing it in V11.
>
--
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