diff options
author | Alin Serdean <aserdean@cloudbasesolutions.com> | 2017-01-10 16:48:29 +0000 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2017-02-02 10:50:58 -0800 |
commit | 83287b6ada52837631a00ea4749d106eb0516412 (patch) | |
tree | d121e07445890395da204b1c4393d28b6c9da898 /datapath-windows/ovsext/Vxlan.c | |
parent | be39122984d965b2079701d7adee85f0fb13ec33 (diff) | |
download | openvswitch-83287b6ada52837631a00ea4749d106eb0516412.tar.gz |
datapath-windows: VXLAN Check for flow destination port
Change the UDP destination port(VXLAN header) to check if it was set by
the userspace, use it if it was set.
If the userspace did not specify a destination port, use the configured
vport destination port.
Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Sairam Venugopal <vsairam@vmware.com>
Diffstat (limited to 'datapath-windows/ovsext/Vxlan.c')
-rw-r--r-- | datapath-windows/ovsext/Vxlan.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/datapath-windows/ovsext/Vxlan.c b/datapath-windows/ovsext/Vxlan.c index 949e069b7..84c2f2fdc 100644 --- a/datapath-windows/ovsext/Vxlan.c +++ b/datapath-windows/ovsext/Vxlan.c @@ -289,7 +289,8 @@ OvsDoEncapVxlan(POVS_VPORT_ENTRY vport, /* UDP header */ udpHdr = (UDPHdr *)((PCHAR)ipHdr + sizeof *ipHdr); udpHdr->source = htons(tunKey->flow_hash | MAXINT16); - udpHdr->dest = htons(vportVxlan->dstPort); + udpHdr->dest = tunKey->dst_port ? tunKey->dst_port : + htons(vportVxlan->dstPort); udpHdr->len = htons(NET_BUFFER_DATA_LENGTH(curNb) - headRoom + sizeof *udpHdr + sizeof *vxlanHdr); |