Commit ed618bd8 authored by Hao Chen's avatar Hao Chen Committed by David S. Miller

net: vxlan: add macro definition for number of IANA VXLAN-GPE port

Add macro definition for number of IANA VXLAN-GPE port for generic use.
Signed-off-by: default avatarHao Chen <chenhao288@hisilicon.com>
Signed-off-by: default avatarGuangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fd888e85
...@@ -3747,7 +3747,7 @@ static int vxlan_config_validate(struct net *src_net, struct vxlan_config *conf, ...@@ -3747,7 +3747,7 @@ static int vxlan_config_validate(struct net *src_net, struct vxlan_config *conf,
if (!conf->dst_port) { if (!conf->dst_port) {
if (conf->flags & VXLAN_F_GPE) 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 else
conf->dst_port = htons(vxlan_port); conf->dst_port = htons(vxlan_port);
} }
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include <net/nexthop.h> #include <net/nexthop.h>
#define IANA_VXLAN_UDP_PORT 4789 #define IANA_VXLAN_UDP_PORT 4789
#define IANA_VXLAN_GPE_UDP_PORT 4790
/* VXLAN protocol (RFC 7348) header: /* VXLAN protocol (RFC 7348) header:
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment