[ovs-dev] [flow-compat 5/7] netlink: New macro NL_POLICY_FOR.
Ben Pfaff
blp at nicira.com
Mon Nov 7 17:22:28 UTC 2011
On Sat, Nov 05, 2011 at 10:44:58AM -0700, Jesse Gross wrote:
> On Fri, Nov 4, 2011 at 4:43 PM, Ben Pfaff <blp at nicira.com> wrote:
> > diff --git a/lib/netlink.h b/lib/netlink.h
> > index b7a87c6..7eced42 100644
> > --- a/lib/netlink.h
> > +++ b/lib/netlink.h
> > +bool nl_attr_validate(const struct nlattr *, const struct nl_policy *);
>
> I think this was meant to be part of the previous commit.
Oops. Moved.
> I also see a few uses of policies for structures in netdev-linux.c
> that I suspect could use this but they don't currently specify a max
> length, so it's not an exact conversion.
Yeah, that's why I didn't convert them.
The kernel netlink code is not as picky as ours, BTW: generally it
only validates minimum lengths. Maybe we should only do that in
userspace too; it would simplify a few things. Any thoughts on that?
> Otherwise looks good.
Thanks,
Ben.
More information about the dev
mailing list