Message ID | 1506091493-21444-1-git-send-email-gvrose8192@gmail.com |
---|---|
State | Accepted |
Headers | show |
Series | [ovs-dev,1/2] datapath: Check maximum netlink message size | expand |
On Fri, Sep 22, 2017 at 07:44:52AM -0700, Greg Rose wrote: > 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> Thanks, applied to master, branch-2.8, and branch-2.7.
diff --git a/datapath/flow_netlink.c b/datapath/flow_netlink.c index 9b48612..ddabd1f 100644 --- a/datapath/flow_netlink.c +++ b/datapath/flow_netlink.c @@ -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) {
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> --- datapath/flow_netlink.c | 4 ++++ 1 file changed, 4 insertions(+)