summaryrefslogtreecommitdiff
path: root/datapath-windows/ovsext/Tunnel.c
diff options
context:
space:
mode:
authorNithin Raju <nithin@vmware.com>2016-06-17 10:51:52 -0700
committerGurucharan Shetty <guru@ovn.org>2016-06-17 14:16:41 -0700
commit885b8265d682a9736bb0db98c48a811bfd9de6cf (patch)
treef01fdd9a5f20e5690dde0702635d2c900f43f44b /datapath-windows/ovsext/Tunnel.c
parentf69f713bb032e8c31c05477f32e92f0f235a30e2 (diff)
downloadopenvswitch-885b8265d682a9736bb0db98c48a811bfd9de6cf.tar.gz
datapath-windows: use ip proto for tunnel port lookup
In Actions.c, based on the IP Protocol type and L4 port of the outer packet, we lookup the tunnel port. The function that made this happen took the tunnel type as an argument. Semantically, is is better to pass the IP protocol type and let the lookup code map IP protocol type to tunnel type. In the vport add code, we make sure that we block tunnel port addition if there's already a tunnel port that uses the same IP protocol type and L4 port number. Signed-off-by: Nithin Raju <nithin@vmware.com> Acked-by: Sairam Venugopal <vsairam@vmware.com> Acked-by: Yin Lin <linyi@vmware.com> Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Signed-off-by: Gurucharan Shetty <guru@ovn.org>
Diffstat (limited to 'datapath-windows/ovsext/Tunnel.c')
-rw-r--r--datapath-windows/ovsext/Tunnel.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/datapath-windows/ovsext/Tunnel.c b/datapath-windows/ovsext/Tunnel.c
index 97d202099..c5aae1a51 100644
--- a/datapath-windows/ovsext/Tunnel.c
+++ b/datapath-windows/ovsext/Tunnel.c
@@ -285,9 +285,9 @@ OvsInjectPacketThroughActions(PNET_BUFFER_LIST pNbl,
SendFlags |= NDIS_SEND_FLAGS_DISPATCH_LEVEL;
- vport = OvsFindTunnelVportByDstPort(gOvsSwitchContext,
- htons(tunnelKey.dst_port),
- OVS_VPORT_TYPE_VXLAN);
+ vport = OvsFindTunnelVportByDstPortAndType(gOvsSwitchContext,
+ htons(tunnelKey.dst_port),
+ OVS_VPORT_TYPE_VXLAN);
if (vport == NULL){
status = STATUS_UNSUCCESSFUL;