diff options
author | David S. Miller <davem@davemloft.net> | 2021-11-29 12:19:53 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-11-29 12:19:53 +0000 |
commit | fc1e5a3613a8e5e08522b6c84894c6fabf1b5499 (patch) | |
tree | 93ceefd9bb88e297fdc7c6f17d80a7fa7584b12a | |
parent | fd888e85fe6b661e78044dddfec0be5271afa626 (diff) | |
parent | e54b708c5441e3aee20b9352334ff610649ac227 (diff) | |
download | linux-fc1e5a3613a8e5e08522b6c84894c6fabf1b5499.tar.bz2 |
Merge branch 'vxlan-port'
Guangbin Huang says:
====================
net: vxlan: add macro definition for number of IANA VXLAN-GPE port
This series add macro definition for number of IANA VXLAN-GPE port for
cleanup.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 2 | ||||
-rw-r--r-- | drivers/net/vxlan.c | 2 | ||||
-rw-r--r-- | include/net/vxlan.h | 1 |
3 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c index 496ddf397bd4..3eb2985b9c8d 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c @@ -1302,7 +1302,7 @@ static bool hns3_tunnel_csum_bug(struct sk_buff *skb) if (!(!skb->encapsulation && (l4.udp->dest == htons(IANA_VXLAN_UDP_PORT) || l4.udp->dest == htons(GENEVE_UDP_PORT) || - l4.udp->dest == htons(4790)))) + l4.udp->dest == htons(IANA_VXLAN_GPE_UDP_PORT)))) return false; return true; diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index fecff0a46612..359d16780dbb 100644 --- a/drivers/net/vxlan.c +++ b/drivers/net/vxlan.c @@ -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); } diff --git a/include/net/vxlan.h b/include/net/vxlan.h index 08537aa14f7c..5a934bebe630 100644 --- a/include/net/vxlan.h +++ b/include/net/vxlan.h @@ -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: * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |