[ovs-dev] [netlink v4 06/52] netlink: Log duplicate attributes in nl_policy_parse().
Justin Pettit
jpettit at nicira.com
Thu Jan 13 19:38:33 UTC 2011
Looks good.
--Justin
On Jan 11, 2011, at 9:49 PM, Ben Pfaff wrote:
> This made finding one particular bug slightly easier for me.
> ---
> lib/netlink.c | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/lib/netlink.c b/lib/netlink.c
> index bc04f74..2b5188f 100644
> --- a/lib/netlink.c
> +++ b/lib/netlink.c
> @@ -582,6 +582,9 @@ nl_policy_parse(const struct ofpbuf *msg, size_t nla_offset,
> assert(n_required > 0);
> --n_required;
> }
> + if (attrs[type]) {
> + VLOG_DBG_RL(&rl, "%zu: duplicate attr %"PRIu16, offset, type);
> + }
> attrs[type] = nla;
> } else {
> /* Skip attribute type that we don't care about. */
> --
> 1.7.1
>
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev_openvswitch.org
More information about the dev
mailing list