diff mbox

[ovs-dev] ofproto-dpif: add reply on error in ofproto/tnl-push-pop

Message ID 1449482561-28544-1-git-send-email-i.maximets@samsung.com
State Accepted
Headers show

Commit Message

Ilya Maximets Dec. 7, 2015, 10:02 a.m. UTC
Fixes hang of 'ovs-appctl ofproto/tnl-push-pop' when an invalid
argument passed.

Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
---
 ofproto/ofproto-dpif.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Thadeu Lima de Souza Cascardo Dec. 7, 2015, 11:42 a.m. UTC | #1
On Mon, Dec 07, 2015 at 01:02:41PM +0300, Ilya Maximets wrote:
> Fixes hang of 'ovs-appctl ofproto/tnl-push-pop' when an invalid
> argument passed.
> 
> Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
> ---
>  ofproto/ofproto-dpif.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c
> index d920ed0..6561c65 100644
> --- a/ofproto/ofproto-dpif.c
> +++ b/ofproto/ofproto-dpif.c
> @@ -5328,6 +5328,8 @@ disable_tnl_push_pop(struct unixctl_conn *conn OVS_UNUSED, int argc OVS_UNUSED,
>          ofproto_use_tnl_push_pop = true;
>          unixctl_command_reply(conn, "Tunnel push-pop on");
>          ofproto_revalidate_all_backers();
> +    } else {
> +        unixctl_command_reply_error(conn, "Invalid argument");
>      }
>  }
>  
> -- 
> 2.1.4
> 
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev

Acked-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
Ben Pfaff Dec. 7, 2015, 5:13 p.m. UTC | #2
On Mon, Dec 07, 2015 at 01:02:41PM +0300, Ilya Maximets wrote:
> Fixes hang of 'ovs-appctl ofproto/tnl-push-pop' when an invalid
> argument passed.
> 
> Signed-off-by: Ilya Maximets <i.maximets@samsung.com>

Thanks, applied to master, branch-2.5, branch-2.4.
diff mbox

Patch

diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c
index d920ed0..6561c65 100644
--- a/ofproto/ofproto-dpif.c
+++ b/ofproto/ofproto-dpif.c
@@ -5328,6 +5328,8 @@  disable_tnl_push_pop(struct unixctl_conn *conn OVS_UNUSED, int argc OVS_UNUSED,
         ofproto_use_tnl_push_pop = true;
         unixctl_command_reply(conn, "Tunnel push-pop on");
         ofproto_revalidate_all_backers();
+    } else {
+        unixctl_command_reply_error(conn, "Invalid argument");
     }
 }