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:51:07 -0800 |
commit | 2bfd0e96e9cc4e3177e32a177e6704639dacf1d3 (patch) | |
tree | 191af8450ebc8f4665f689af8ea0dfb597ff5278 /datapath-windows/ovsext/Stt.c | |
parent | 83287b6ada52837631a00ea4749d106eb0516412 (diff) | |
download | openvswitch-2bfd0e96e9cc4e3177e32a177e6704639dacf1d3.tar.gz |
datapath-windows: STT Check for flow destination port
Change the TCP destination port(STT 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/Stt.c')
-rw-r--r-- | datapath-windows/ovsext/Stt.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/datapath-windows/ovsext/Stt.c b/datapath-windows/ovsext/Stt.c index 9da81dc4e..5aa8652d7 100644 --- a/datapath-windows/ovsext/Stt.c +++ b/datapath-windows/ovsext/Stt.c @@ -308,7 +308,8 @@ OvsDoEncapStt(POVS_VPORT_ENTRY vport, /* L4 header */ RtlZeroMemory(outerTcpHdr, sizeof *outerTcpHdr); outerTcpHdr->source = htons(tunKey->flow_hash | 32768); - outerTcpHdr->dest = htons(vportStt->dstPort); + outerTcpHdr->dest = tunKey->dst_port ? tunKey->dst_port: + htons(vportStt->dstPort); outerTcpHdr->seq = htonl((STT_HDR_LEN + innerFrameLen) << STT_SEQ_LEN_SHIFT); outerTcpHdr->ack_seq = htonl(atomic_inc64(&vportStt->ackNo)); |