summaryrefslogtreecommitdiff
path: root/datapath-windows
diff options
context:
space:
mode:
authorSorin Vinturis <svinturis@cloudbasesolutions.com>2015-06-18 18:37:13 +0000
committerBen Pfaff <blp@nicira.com>2015-06-23 11:45:43 -0700
commit1c218735054d30d636215f0a6cd899a156592070 (patch)
treebef63f469f09d368c00712695d6275f90b1853c9 /datapath-windows
parentab70cd304210ef226fe7fc98e8fb322ec8040594 (diff)
downloadopenvswitch-1c218735054d30d636215f0a6cd899a156592070.tar.gz
datapath-windows: Return success for already existing WFP objects
There are cases when the WFP callout or sublayer, being persistent objects, already exists when we try to register the OVS callout. In this cases, when trying to add again these WFP objects the return code is STATUS_FWP_ALREADY_EXISTS, which we are interpreting as an error. This is incorrect and this patch changes that. Signed-off-by: Sorin Vinturis <svinturis@cloudbasesolutions.com> Reported-by: Sorin Vinturis <svinturis@cloudbasesolutions.com> Reported-at: https://github.com/openvswitch/ovs-issues/issues/84 Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'datapath-windows')
-rw-r--r--datapath-windows/ovsext/TunnelFilter.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/datapath-windows/ovsext/TunnelFilter.c b/datapath-windows/ovsext/TunnelFilter.c
index 08cc13f34..231750e46 100644
--- a/datapath-windows/ovsext/TunnelFilter.c
+++ b/datapath-windows/ovsext/TunnelFilter.c
@@ -414,7 +414,12 @@ OvsTunnelRegisterDatagramDataCallouts(const GUID *layerKey,
status = FwpmCalloutAdd(gEngineHandle, &mCallout, NULL, NULL);
if (!NT_SUCCESS(status)) {
- goto Exit;
+ if (STATUS_FWP_ALREADY_EXISTS != status) {
+ OVS_LOG_ERROR("Failed to add WFP callout, status: %x.",
+ status);
+ goto Exit;
+ }
+ status = STATUS_SUCCESS;
}
Exit:
@@ -459,7 +464,11 @@ OvsTunnelRegisterCallouts(VOID *deviceObject)
status = FwpmSubLayerAdd(gEngineHandle, &OvsTunnelSubLayer, NULL);
if (!NT_SUCCESS(status)) {
- goto Exit;
+ if (STATUS_FWP_ALREADY_EXISTS != status) {
+ OVS_LOG_ERROR("Failed to add WFP sublayer, status: %x.",
+ status);
+ goto Exit;
+ }
}
/* In order to use this callout a socket must be opened. */