From: Ben Pfaff Date: Tue, 11 Jan 2011 22:12:03 +0000 (-0800) Subject: netlink: Log duplicate attributes in nl_policy_parse(). X-Git-Tag: v1.1.0~438 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=33cada0cf1f24beb79c23328acb2bf9860c34679;p=sliver-openvswitch.git netlink: Log duplicate attributes in nl_policy_parse(). This made finding one particular bug slightly easier for me. Reviewed by Justin Pettit. --- diff --git a/lib/netlink.c b/lib/netlink.c index 48a52ee34..725bba02f 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. */