Fair enough. I made that change and I'll push this soon.
On Tue, Dec 31, 2013 at 11:29:15AM -0800, Justin Pettit wrote: > This is clearly correct, but the code a little below wraps "0" in an > htons(), so if you wanted to be consistent style-wise, you could similarly > wrap the new "0" in a ntohs(). > > Acked-by: Justin Pettit <[email protected]> > > --Justin > > > > > On Tue, Dec 31, 2013 at 10:45 AM, Ben Pfaff <[email protected]> wrote: > > > For parsing a mask, this code in parse_8021q_onward() always read out > > the OVS_KEY_ATTR_VLAN attribute without first checking whether it existed. > > The correct behavior, implemented by this commit, appears to be treating > > the VLAN as wildcarded and to continue parsing the flow. > > > > Bug #22312. > > Reported-by: Krishna Miriyala <[email protected]> > > Signed-off-by: Ben Pfaff <[email protected]> > > --- > > 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 f44c7d4..11aa2c0 100644 > > --- a/lib/odp-util.c > > +++ b/lib/odp-util.c > > @@ -3035,7 +3035,9 @@ parse_8021q_onward(const struct nlattr > > *attrs[OVS_KEY_ATTR_MAX + 1], > > if (!is_mask && !(present_attrs & (UINT64_C(1) << > > OVS_KEY_ATTR_VLAN))) { > > return ODP_FIT_TOO_LITTLE; > > } else { > > - tci = nl_attr_get_be16(attrs[OVS_KEY_ATTR_VLAN]); > > + tci = (present_attrs & (UINT64_C(1) << OVS_KEY_ATTR_VLAN) > > + ? nl_attr_get_be16(attrs[OVS_KEY_ATTR_VLAN]) > > + : 0); > > if (!is_mask) { > > if (tci == htons(0)) { > > /* Corner case for a truncated 802.1Q header. */ > > -- > > 1.7.10.4 > > > > _______________________________________________ > > dev mailing list > > [email protected] > > http://openvswitch.org/mailman/listinfo/dev > > _______________________________________________ dev mailing list [email protected] http://openvswitch.org/mailman/listinfo/dev
