All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] lwtunnel: change to use nla_put_u8 for LWTUNNEL_IP_OPT_ERSPAN_VER
@ 2019-11-18 10:10 Xin Long
  2019-11-18 13:03 ` Simon Horman
  2019-11-19  1:20 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Xin Long @ 2019-11-18 10:10 UTC (permalink / raw)
  To: network dev; +Cc: davem, simon.horman

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>
---
 net/ipv4/ip_tunnel_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv4/ip_tunnel_core.c b/net/ipv4/ip_tunnel_core.c
index d4f84bf..11f30b2 100644
--- a/net/ipv4/ip_tunnel_core.c
+++ b/net/ipv4/ip_tunnel_core.c
@@ -524,7 +524,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 &&
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] lwtunnel: change to use nla_put_u8 for LWTUNNEL_IP_OPT_ERSPAN_VER
  2019-11-18 10:10 [PATCH net-next] lwtunnel: change to use nla_put_u8 for LWTUNNEL_IP_OPT_ERSPAN_VER Xin Long
@ 2019-11-18 13:03 ` Simon Horman
  2019-11-19  1:20 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2019-11-18 13:03 UTC (permalink / raw)
  To: Xin Long; +Cc: network dev, davem

On Mon, Nov 18, 2019 at 06:10:12PM +0800, Xin Long wrote:
> 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>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] lwtunnel: change to use nla_put_u8 for LWTUNNEL_IP_OPT_ERSPAN_VER
  2019-11-18 10:10 [PATCH net-next] lwtunnel: change to use nla_put_u8 for LWTUNNEL_IP_OPT_ERSPAN_VER Xin Long
  2019-11-18 13:03 ` Simon Horman
@ 2019-11-19  1:20 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2019-11-19  1:20 UTC (permalink / raw)
  To: lucien.xin; +Cc: netdev, simon.horman

From: Xin Long <lucien.xin@gmail.com>
Date: Mon, 18 Nov 2019 18:10:12 +0800

> 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>

Applied.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-11-19  1:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-18 10:10 [PATCH net-next] lwtunnel: change to use nla_put_u8 for LWTUNNEL_IP_OPT_ERSPAN_VER Xin Long
2019-11-18 13:03 ` Simon Horman
2019-11-19  1:20 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.