Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d5ff72d9 authored by Lance Richardson's avatar Lance Richardson Committed by David S. Miller
Browse files

vxlan: fix byte order of vxlan-gpe port number



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: e1e5314d ("vxlan: implement GPE")
Signed-off-by: default avatarLance Richardson <lrichard@redhat.com>
Acked-by: default avatarJiri Benc <jbenc@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a249708b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
	}