[ovs-dev] [PATCH] odp-util: Only add recirc_id mask to Netlink message if mask is provided

Ben Pfaff blp at nicira.com
Tue Aug 26 18:30:08 UTC 2014


Too late, I already got this one ;-)

On Tue, Aug 26, 2014 at 11:24:17AM -0700, Andy Zhou wrote:
> Thanks for the fix. Will push in a short while.
> 
> Acked-by: Andy Zhou <azhou at nicira.com>
> 
> On Tue, Aug 26, 2014 at 9:34 AM, Thomas Graf <tgraf at noironetworks.com> wrote:
> > Current unconditional call may result in NULL being passed to
> > nl_msg_put_u32().
> >
> > Cc: Andy Zhou <azhou at nicira.com>
> > Signed-off-by: Thomas Graf <tgraf at noironetworks.com>
> > ---
> >  lib/odp-util.c | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/lib/odp-util.c b/lib/odp-util.c
> > index 19d0627..8a96068 100644
> > --- a/lib/odp-util.c
> > +++ b/lib/odp-util.c
> > @@ -1755,7 +1755,9 @@ parse_odp_key_mask_attr(const char *s, const struct simap *port_names,
> >
> >          if (ovs_scan(s, "recirc_id(%"SCNi32")%n", &recirc_id, &n)) {
> >              nl_msg_put_u32(key, OVS_KEY_ATTR_RECIRC_ID, recirc_id);
> > -            nl_msg_put_u32(mask, OVS_KEY_ATTR_RECIRC_ID, UINT32_MAX);
> > +            if (mask) {
> > +                nl_msg_put_u32(mask, OVS_KEY_ATTR_RECIRC_ID, UINT32_MAX);
> > +            }
> >              return n;
> >          }
> >      }
> > --
> > 1.9.3
> >
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev



More information about the dev mailing list