Skip to content

Commit

Permalink
datapath: Check maximum netlink message size
Browse files Browse the repository at this point in the history
In kernels < 4.9 the maximum netlink message size is 16KB.

See http://www.spinics.net/lists/netdev/msg431592.html

Signed-off-by: Greg Rose <gvrose8192@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
  • Loading branch information
gvrose8192 authored and blp committed Oct 31, 2017
1 parent dc02e1e commit 4315b6f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions datapath/flow_netlink.c
Expand Up @@ -1902,7 +1902,11 @@ int ovs_nla_put_mask(const struct sw_flow *flow, struct sk_buff *skb)
OVS_FLOW_ATTR_MASK, true, skb);
}

#if LINUX_VERSION_CODE < KERNEL_VERSION(4,9,0)
#define MAX_ACTIONS_BUFSIZE (16 * 1024)
#else
#define MAX_ACTIONS_BUFSIZE (32 * 1024)
#endif

static struct sw_flow_actions *nla_alloc_flow_actions(int size, bool log)
{
Expand Down

0 comments on commit 4315b6f

Please sign in to comment.