vxlan: fix byte order of vxlan-gpe port number
authorLance Richardson <lrichard@redhat.com>
Mon, 16 Jan 2017 23:37:58 +0000 (18:37 -0500)
committerDavid S. Miller <davem@davemloft.net>
Tue, 17 Jan 2017 20:23:43 +0000 (15:23 -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>
Acked-by: Jiri Benc <jbenc@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/vxlan.c

index ca7196c400609b8cfe6fe9da5efae19770258de8..8a79cfcac8899d03d5dbe8baa5aae647b97aa689 100644 (file)
@@ -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;
        }