Skip to content

Commit

Permalink
net: vxlan: add macro definition for number of IANA VXLAN-GPE port
Browse files Browse the repository at this point in the history
Add macro definition for number of IANA VXLAN-GPE port for generic use.

Signed-off-by: Hao Chen <chenhao288@hisilicon.com>
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Hao Chen authored and David S. Miller committed Nov 29, 2021
1 parent fd888e8 commit ed618bd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/vxlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -3747,7 +3747,7 @@ static int vxlan_config_validate(struct net *src_net, struct vxlan_config *conf,

if (!conf->dst_port) {
if (conf->flags & VXLAN_F_GPE)
conf->dst_port = htons(4790); /* IANA VXLAN-GPE port */
conf->dst_port = htons(IANA_VXLAN_GPE_UDP_PORT);
else
conf->dst_port = htons(vxlan_port);
}
Expand Down
1 change: 1 addition & 0 deletions include/net/vxlan.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <net/nexthop.h>

#define IANA_VXLAN_UDP_PORT 4789
#define IANA_VXLAN_GPE_UDP_PORT 4790

/* VXLAN protocol (RFC 7348) header:
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Expand Down

0 comments on commit ed618bd

Please sign in to comment.