Skip to content

Commit c303aa9

Browse files
committed
openvswitch: Fix FLOW_BUFSIZE definition.
The vlan encapsulation fields in the maximum flow defintion were never updated when the representation changed before upstreaming. In theory this could cause a kernel panic when a maximum length flow is used. In practice this has never happened (to my knowledge) because skb allocations are padded out to a cache line so you would need the right combination of flow and packet being sent to userspace. Signed-off-by: Jesse Gross <jesse@nicira.com>
1 parent 39855b5 commit c303aa9

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

‎net/openvswitch/flow.h‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,15 +145,17 @@ u64 ovs_flow_used_time(unsigned long flow_jiffies);
145145
* OVS_KEY_ATTR_PRIORITY 4 -- 4 8
146146
* OVS_KEY_ATTR_IN_PORT 4 -- 4 8
147147
* OVS_KEY_ATTR_ETHERNET 12 -- 4 16
148+
* OVS_KEY_ATTR_ETHERTYPE 2 2 4 8 (outer VLAN ethertype)
148149
* OVS_KEY_ATTR_8021Q 4 -- 4 8
149-
* OVS_KEY_ATTR_ETHERTYPE 2 2 4 8
150+
* OVS_KEY_ATTR_ENCAP 0 -- 4 4 (VLAN encapsulation)
151+
* OVS_KEY_ATTR_ETHERTYPE 2 2 4 8 (inner VLAN ethertype)
150152
* OVS_KEY_ATTR_IPV6 40 -- 4 44
151153
* OVS_KEY_ATTR_ICMPV6 2 2 4 8
152154
* OVS_KEY_ATTR_ND 28 -- 4 32
153155
* -------------------------------------------------
154-
* total 132
156+
* total 144
155157
*/
156-
#define FLOW_BUFSIZE 132
158+
#define FLOW_BUFSIZE 144
157159

158160
int ovs_flow_to_nlattrs(const struct sw_flow_key *, struct sk_buff *);
159161
int ovs_flow_from_nlattrs(struct sw_flow_key *swkey, int *key_lenp,

0 commit comments

Comments
 (0)