From 44fb02db62b420c8aeb469662fb8863c12c9eb0b Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Tue, 28 Jun 2022 14:06:30 +0200 Subject: [PATCH] vxlan: fix endian of the configured port Signed-off-by: Felix Fietkau --- vxlan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vxlan.c b/vxlan.c index 34bb869..b15d4c3 100644 --- a/vxlan.c +++ b/vxlan.c @@ -223,7 +223,7 @@ vxlan_tunnel_init(struct vxlan_tunnel *vt) nla_put_u32(msg, IFLA_VXLAN_ID, vxlan_tunnel_id(vt)); nla_put(msg, IFLA_VXLAN_LOCAL6, sizeof(struct in6_addr), &local->local_addr); nla_put(msg, IFLA_VXLAN_GROUP6, sizeof(struct in6_addr), &group_addr); - nla_put_u16(msg, IFLA_VXLAN_PORT, vt->port); + nla_put_u16(msg, IFLA_VXLAN_PORT, htons(vt->port)); nla_put_u8(msg, IFLA_VXLAN_LEARNING, 1); nla_put_u32(msg, IFLA_VXLAN_LINK, vt->net->ifindex); nla_nest_end(msg, data); -- 2.30.2