]> git.baikalelectronics.ru Git - kernel.git/commit
lwtunnel: get nlsize for erspan options properly
authorXin Long <lucien.xin@gmail.com>
Sun, 10 Nov 2019 04:21:18 +0000 (12:21 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 11 Nov 2019 22:42:38 +0000 (14:42 -0800)
commitd5c09acbf0c78fc1dd65f86db551defffbabf307
tree048d85363d5c296b2c8a58535c250d12514ddc35
parent50089e6d92351a67ab82f53e39b5956b3298c33d
lwtunnel: get nlsize for erspan options properly

erspan v1 has OPT_ERSPAN_INDEX while erspan v2 has OPT_ERSPAN_DIR and
OPT_ERSPAN_HWID attributes, and they require different nlsize when
dumping.

So this patch is to get nlsize for erspan options properly according
to erspan version.

Fixes: 228ba77284f5 ("lwtunnel: add options setting and dumping for erspan")
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ip_tunnel_core.c