diff mbox series

[ovs-dev] ofproto-dpif-xlate: Restore table ID on error in xlate_table_action().

Message ID 20191014223421.793-1-blp@ovn.org
State Accepted
Commit 7b950521f5fc4d318fd841d67f43eb7f84972cbe
Headers show
Series [ovs-dev] ofproto-dpif-xlate: Restore table ID on error in xlate_table_action(). | expand

Commit Message

Ben Pfaff Oct. 14, 2019, 10:34 p.m. UTC
Found by inspection.

Signed-off-by: Ben Pfaff <blp@ovn.org>
---
 ofproto/ofproto-dpif-xlate.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Ben Pfaff Nov. 26, 2019, 10:40 p.m. UTC | #1
On Mon, Oct 14, 2019 at 03:34:21PM -0700, Ben Pfaff wrote:
> Found by inspection.
> 
> Signed-off-by: Ben Pfaff <blp@ovn.org>

Still needs review.
Yi-Hung Wei Nov. 27, 2019, 6:04 p.m. UTC | #2
On Mon, Oct 14, 2019 at 4:33 PM Ben Pfaff <blp@ovn.org> wrote:
>
> Found by inspection.
>
> Signed-off-by: Ben Pfaff <blp@ovn.org>
> ---
>  ofproto/ofproto-dpif-xlate.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c
> index f92cb62c80ce..0fa5d8a7c61b 100644
> --- a/ofproto/ofproto-dpif-xlate.c
> +++ b/ofproto/ofproto-dpif-xlate.c
> @@ -4369,6 +4369,7 @@ xlate_table_action(struct xlate_ctx *ctx, ofp_port_t in_port, uint8_t table_id,
>                  !is_ip_any(&ctx->xin->flow)) {
>                  xlate_report_error(ctx,
>                                     "resubmit(ct) with non-tracked or non-IP packet!");
> +                ctx->table_id = old_table_id;
>                  return;
>              }
>              tuple_swap(&ctx->xin->flow, ctx->wc);
> --

Thanks for the patch. It looks good to me.

Acked-by: Yi-Hung Wei <yihung.wei@gmail.com>
Ben Pfaff Dec. 2, 2019, 8:43 p.m. UTC | #3
On Wed, Nov 27, 2019 at 10:04:24AM -0800, Yi-Hung Wei wrote:
> On Mon, Oct 14, 2019 at 4:33 PM Ben Pfaff <blp@ovn.org> wrote:
> >
> > Found by inspection.
> >
> > Signed-off-by: Ben Pfaff <blp@ovn.org>
> > ---
> >  ofproto/ofproto-dpif-xlate.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c
> > index f92cb62c80ce..0fa5d8a7c61b 100644
> > --- a/ofproto/ofproto-dpif-xlate.c
> > +++ b/ofproto/ofproto-dpif-xlate.c
> > @@ -4369,6 +4369,7 @@ xlate_table_action(struct xlate_ctx *ctx, ofp_port_t in_port, uint8_t table_id,
> >                  !is_ip_any(&ctx->xin->flow)) {
> >                  xlate_report_error(ctx,
> >                                     "resubmit(ct) with non-tracked or non-IP packet!");
> > +                ctx->table_id = old_table_id;
> >                  return;
> >              }
> >              tuple_swap(&ctx->xin->flow, ctx->wc);
> > --
> 
> Thanks for the patch. It looks good to me.
> 
> Acked-by: Yi-Hung Wei <yihung.wei@gmail.com>

Thanks.  Applied and backported.
diff mbox series

Patch

diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c
index f92cb62c80ce..0fa5d8a7c61b 100644
--- a/ofproto/ofproto-dpif-xlate.c
+++ b/ofproto/ofproto-dpif-xlate.c
@@ -4369,6 +4369,7 @@  xlate_table_action(struct xlate_ctx *ctx, ofp_port_t in_port, uint8_t table_id,
                 !is_ip_any(&ctx->xin->flow)) {
                 xlate_report_error(ctx,
                                    "resubmit(ct) with non-tracked or non-IP packet!");
+                ctx->table_id = old_table_id;
                 return;
             }
             tuple_swap(&ctx->xin->flow, ctx->wc);