diff mbox

[ovs-dev] datapath-windows: Report correctly when trying to add tunnel types

Message ID 1446099340-6936-1-git-send-email-aserdean@cloudbasesolutions.com
State Accepted
Headers show

Commit Message

Alin Serdean Oct. 29, 2015, 6:15 a.m. UTC
Report invalid parameter to the userspace if the user tries to add a vport
tunnel type which is not supported by the kernel extension.

Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
---
 datapath-windows/ovsext/Vport.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Ben Pfaff Nov. 3, 2015, 6:55 p.m. UTC | #1
On Thu, Oct 29, 2015 at 06:15:44AM +0000, Alin Serdean wrote:
> Report invalid parameter to the userspace if the user tries to add a vport
> tunnel type which is not supported by the kernel extension.
> 
> Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>

Applied to master, thanks!
diff mbox

Patch

diff --git a/datapath-windows/ovsext/Vport.c b/datapath-windows/ovsext/Vport.c
index 4ade842..658161d 100644
--- a/datapath-windows/ovsext/Vport.c
+++ b/datapath-windows/ovsext/Vport.c
@@ -2188,7 +2188,8 @@  OvsNewVportCmdHandler(POVS_USER_PARAMS_CONTEXT usrParamsCtx,
                 transportPortDest = STT_TCP_PORT;
                 break;
             default:
-                break;
+                nlError = NL_ERROR_INVAL;
+                goto Cleanup;
             }
 
             if (vportAttrs[OVS_VPORT_ATTR_OPTIONS]) {