aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/ip_tunnel_core.c
diff options
context:
space:
mode:
authorXin Long <lucien.xin@gmail.com>2019-11-18 18:10:12 +0800
committerDavid S. Miller <davem@davemloft.net>2019-11-18 17:19:56 -0800
commit3132174b4b5c999d383f047eebdcd8a326431802 (patch)
tree83167f15b90cddeecb2d343fdca512468dbb5e9b /net/ipv4/ip_tunnel_core.c
parentMerge branch 'bnxt_en-Updates' (diff)
downloadlinux-dev-3132174b4b5c999d383f047eebdcd8a326431802.tar.xz
linux-dev-3132174b4b5c999d383f047eebdcd8a326431802.zip
lwtunnel: change to use nla_put_u8 for LWTUNNEL_IP_OPT_ERSPAN_VER
LWTUNNEL_IP_OPT_ERSPAN_VER is u8 type, and nla_put_u8 should have been used instead of nla_put_u32(). This is a copy-paste error. Fixes: b0a21810bd5e ("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>
Diffstat (limited to 'net/ipv4/ip_tunnel_core.c')
-rw-r--r--net/ipv4/ip_tunnel_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/ip_tunnel_core.c b/net/ipv4/ip_tunnel_core.c
index c724fb30d048..db942b4a2e4a 100644
--- a/net/ipv4/ip_tunnel_core.c
+++ b/net/ipv4/ip_tunnel_core.c
@@ -526,7 +526,7 @@ static int ip_tun_fill_encap_opts_erspan(struct sk_buff *skb,
return -ENOMEM;
md = ip_tunnel_info_opts(tun_info);
- if (nla_put_u32(skb, LWTUNNEL_IP_OPT_ERSPAN_VER, md->version))
+ if (nla_put_u8(skb, LWTUNNEL_IP_OPT_ERSPAN_VER, md->version))
goto err;
if (md->version == 1 &&