* [PATCH net] vxlan: fix byte order of vxlan-gpe port number
@ 2017-01-16 23:37 Lance Richardson
2017-01-17 10:15 ` Jiri Benc
2017-01-17 20:24 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Lance Richardson @ 2017-01-16 23:37 UTC (permalink / raw)
To: netdev, jbenc
vxlan->cfg.dst_port is in network byte order, so an htons()
is needed here. Also reduced comment length to stay closer
to 80 column width (still slightly over, however).
Fixes: e1e5314de08b ("vxlan: implement GPE")
Signed-off-by: Lance Richardson <lrichard@redhat.com>
---
drivers/net/vxlan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index ca7196c..8a79cfc 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -2890,7 +2890,7 @@ static int vxlan_dev_configure(struct net *src_net, struct net_device *dev,
memcpy(&vxlan->cfg, conf, sizeof(*conf));
if (!vxlan->cfg.dst_port) {
if (conf->flags & VXLAN_F_GPE)
- vxlan->cfg.dst_port = 4790; /* IANA assigned VXLAN-GPE port */
+ vxlan->cfg.dst_port = htons(4790); /* IANA VXLAN-GPE port */
else
vxlan->cfg.dst_port = default_port;
}
--
2.5.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net] vxlan: fix byte order of vxlan-gpe port number
2017-01-16 23:37 [PATCH net] vxlan: fix byte order of vxlan-gpe port number Lance Richardson
@ 2017-01-17 10:15 ` Jiri Benc
2017-01-17 20:24 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Jiri Benc @ 2017-01-17 10:15 UTC (permalink / raw)
To: Lance Richardson; +Cc: netdev
On Mon, 16 Jan 2017 18:37:58 -0500, Lance Richardson wrote:
> vxlan->cfg.dst_port is in network byte order, so an htons()
> is needed here. Also reduced comment length to stay closer
> to 80 column width (still slightly over, however).
Ouch. A stupid mistake I made. I think it's still okay to fix this, I'm
not aware of anyone using VXLAN-GPE yet, it's main user is going to be
NSH which is still under development.
Acked-by: Jiri Benc <jbenc@redhat.com>
Please apply also to stable.
Thanks,
Jiri
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net] vxlan: fix byte order of vxlan-gpe port number
2017-01-16 23:37 [PATCH net] vxlan: fix byte order of vxlan-gpe port number Lance Richardson
2017-01-17 10:15 ` Jiri Benc
@ 2017-01-17 20:24 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2017-01-17 20:24 UTC (permalink / raw)
To: lrichard; +Cc: netdev, jbenc
From: Lance Richardson <lrichard@redhat.com>
Date: Mon, 16 Jan 2017 18:37:58 -0500
> vxlan->cfg.dst_port is in network byte order, so an htons()
> is needed here. Also reduced comment length to stay closer
> to 80 column width (still slightly over, however).
>
> Fixes: e1e5314de08b ("vxlan: implement GPE")
> Signed-off-by: Lance Richardson <lrichard@redhat.com>
Applied and queued up for -stable, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-01-17 20:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-16 23:37 [PATCH net] vxlan: fix byte order of vxlan-gpe port number Lance Richardson
2017-01-17 10:15 ` Jiri Benc
2017-01-17 20:24 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).