diff options
author | Alin Serdean <aserdean@cloudbasesolutions.com> | 2017-01-10 16:48:30 +0000 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2017-02-02 10:51:21 -0800 |
commit | 654b8cb38f98cbd2f442c25f33c28dbd765a5608 (patch) | |
tree | 8844cc81e3722e3d73db0d52dacece0eff0b5326 /datapath-windows/ovsext/Geneve.c | |
parent | 2bfd0e96e9cc4e3177e32a177e6704639dacf1d3 (diff) | |
download | openvswitch-654b8cb38f98cbd2f442c25f33c28dbd765a5608.tar.gz |
datapath-windows: GENEVE Check for flow destination port
Change the UDP destination port(GENEVE 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/Geneve.c')
-rw-r--r-- | datapath-windows/ovsext/Geneve.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/datapath-windows/ovsext/Geneve.c b/datapath-windows/ovsext/Geneve.c index d38a65659..1938aaa57 100644 --- a/datapath-windows/ovsext/Geneve.c +++ b/datapath-windows/ovsext/Geneve.c @@ -201,7 +201,8 @@ NDIS_STATUS OvsEncapGeneve(POVS_VPORT_ENTRY vport, /* UDP header */ udpHdr = (UDPHdr *)((PCHAR)ipHdr + sizeof *ipHdr); udpHdr->source = htons(tunKey->flow_hash | MAXINT16); - udpHdr->dest = htons(vportGeneve->dstPort); + udpHdr->dest = tunKey->dst_port ? tunKey->dst_port : + htons(vportGeneve->dstPort); udpHdr->len = htons(NET_BUFFER_DATA_LENGTH(curNb) - headRoom + sizeof *udpHdr + sizeof *geneveHdr + tunKey->tunOptLen); |