diff options
Diffstat (limited to 'net/openvswitch')
| -rw-r--r-- | net/openvswitch/actions.c | 2 | ||||
| -rw-r--r-- | net/openvswitch/datapath.c | 6 | ||||
| -rw-r--r-- | net/openvswitch/flow.h | 8 | 
3 files changed, 9 insertions, 7 deletions
diff --git a/net/openvswitch/actions.c b/net/openvswitch/actions.c index f3f96badf5a..954405ceae9 100644 --- a/net/openvswitch/actions.c +++ b/net/openvswitch/actions.c @@ -45,7 +45,7 @@ static int make_writable(struct sk_buff *skb, int write_len)  	return pskb_expand_head(skb, 0, 0, GFP_ATOMIC);  } -/* remove VLAN header from packet and update csum accrodingly. */ +/* remove VLAN header from packet and update csum accordingly. */  static int __pop_vlan_tci(struct sk_buff *skb, __be16 *current_tci)  {  	struct vlan_hdr *vhdr; diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c index d8277d29e71..cf58cedad08 100644 --- a/net/openvswitch/datapath.c +++ b/net/openvswitch/datapath.c @@ -425,10 +425,10 @@ static int validate_sample(const struct nlattr *attr,  static int validate_tp_port(const struct sw_flow_key *flow_key)  {  	if (flow_key->eth.type == htons(ETH_P_IP)) { -		if (flow_key->ipv4.tp.src && flow_key->ipv4.tp.dst) +		if (flow_key->ipv4.tp.src || flow_key->ipv4.tp.dst)  			return 0;  	} else if (flow_key->eth.type == htons(ETH_P_IPV6)) { -		if (flow_key->ipv6.tp.src && flow_key->ipv6.tp.dst) +		if (flow_key->ipv6.tp.src || flow_key->ipv6.tp.dst)  			return 0;  	} @@ -460,7 +460,7 @@ static int validate_set(const struct nlattr *a,  		if (flow_key->eth.type != htons(ETH_P_IP))  			return -EINVAL; -		if (!flow_key->ipv4.addr.src || !flow_key->ipv4.addr.dst) +		if (!flow_key->ip.proto)  			return -EINVAL;  		ipv4_key = nla_data(ovs_key); diff --git a/net/openvswitch/flow.h b/net/openvswitch/flow.h index 9b75617ca4e..c30df1a10c6 100644 --- a/net/openvswitch/flow.h +++ b/net/openvswitch/flow.h @@ -145,15 +145,17 @@ u64 ovs_flow_used_time(unsigned long flow_jiffies);   *  OVS_KEY_ATTR_PRIORITY      4    --     4      8   *  OVS_KEY_ATTR_IN_PORT       4    --     4      8   *  OVS_KEY_ATTR_ETHERNET     12    --     4     16 + *  OVS_KEY_ATTR_ETHERTYPE     2     2     4      8  (outer VLAN ethertype)   *  OVS_KEY_ATTR_8021Q         4    --     4      8 - *  OVS_KEY_ATTR_ETHERTYPE     2     2     4      8 + *  OVS_KEY_ATTR_ENCAP         0    --     4      4  (VLAN encapsulation) + *  OVS_KEY_ATTR_ETHERTYPE     2     2     4      8  (inner VLAN ethertype)   *  OVS_KEY_ATTR_IPV6         40    --     4     44   *  OVS_KEY_ATTR_ICMPV6        2     2     4      8   *  OVS_KEY_ATTR_ND           28    --     4     32   *  ------------------------------------------------- - *  total                                       132 + *  total                                       144   */ -#define FLOW_BUFSIZE 132 +#define FLOW_BUFSIZE 144  int ovs_flow_to_nlattrs(const struct sw_flow_key *, struct sk_buff *);  int ovs_flow_from_nlattrs(struct sw_flow_key *swkey, int *key_lenp,  |