Re: [ovs-dev] [PATCH v1] ofproto-dpif-trace: Fix for the segmentation fault in ofproto_trace().

2019-02-04 Thread Ben Pfaff
On Mon, Feb 04, 2019 at 03:34:34PM -0800, Ashish Varma wrote:
> Added the check for NULL in "next_ct_states" argument passed to the
> "ofproto_trace()" function. Under normal scenario, this is non-NULL. A NULL
> "next_ct_states" argument is passed from the "upcall_xlate()" function on
> encountering XLATE_RECURSION_TOO_DEEP or XLATE_TOO_MANY_RESUBMITS error.
> 
> VMware-BZ: #2282287
> Signed-off-by: Ashish Varma 

Thanks, applied to master and backported as far as branch-2.8.
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v1] ofproto-dpif-trace: Fix for the segmentation fault in ofproto_trace().

2019-02-04 Thread Yifeng Sun
Thanks for the fix. I am wondering if we can output some useful information
in 'struct ds' for this case?

On Mon, Feb 4, 2019 at 3:45 PM Ashish Varma 
wrote:

> Added the check for NULL in "next_ct_states" argument passed to the
> "ofproto_trace()" function. Under normal scenario, this is non-NULL. A NULL
> "next_ct_states" argument is passed from the "upcall_xlate()" function on
> encountering XLATE_RECURSION_TOO_DEEP or XLATE_TOO_MANY_RESUBMITS error.
>
> VMware-BZ: #2282287
> Signed-off-by: Ashish Varma 
> ---
>  ofproto/ofproto-dpif-trace.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/ofproto/ofproto-dpif-trace.c b/ofproto/ofproto-dpif-trace.c
> index eca61ce..4a981e1 100644
> --- a/ofproto/ofproto-dpif-trace.c
> +++ b/ofproto/ofproto-dpif-trace.c
> @@ -740,7 +740,7 @@ ofproto_trace(struct ofproto_dpif *ofproto, const
> struct flow *flow,
>  ds_put_format(output, "\nrecirc(%#"PRIx32")",
>recirc_node->recirc_id);
>
> -if (recirc_node->type == OFT_RECIRC_CONNTRACK) {
> +if (next_ct_states && recirc_node->type == OFT_RECIRC_CONNTRACK) {
>  uint32_t ct_state;
>  if (ovs_list_is_empty(next_ct_states)) {
>  ct_state = CS_TRACKED | CS_NEW;
> --
> 2.7.4
>
> ___
> dev mailing list
> d...@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH v1] ofproto-dpif-trace: Fix for the segmentation fault in ofproto_trace().

2019-02-04 Thread Ashish Varma
Added the check for NULL in "next_ct_states" argument passed to the
"ofproto_trace()" function. Under normal scenario, this is non-NULL. A NULL
"next_ct_states" argument is passed from the "upcall_xlate()" function on
encountering XLATE_RECURSION_TOO_DEEP or XLATE_TOO_MANY_RESUBMITS error.

VMware-BZ: #2282287
Signed-off-by: Ashish Varma 
---
 ofproto/ofproto-dpif-trace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ofproto/ofproto-dpif-trace.c b/ofproto/ofproto-dpif-trace.c
index eca61ce..4a981e1 100644
--- a/ofproto/ofproto-dpif-trace.c
+++ b/ofproto/ofproto-dpif-trace.c
@@ -740,7 +740,7 @@ ofproto_trace(struct ofproto_dpif *ofproto, const struct 
flow *flow,
 ds_put_format(output, "\nrecirc(%#"PRIx32")",
   recirc_node->recirc_id);
 
-if (recirc_node->type == OFT_RECIRC_CONNTRACK) {
+if (next_ct_states && recirc_node->type == OFT_RECIRC_CONNTRACK) {
 uint32_t ct_state;
 if (ovs_list_is_empty(next_ct_states)) {
 ct_state = CS_TRACKED | CS_NEW;
-- 
2.7.4

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev