From: Ben Pfaff Date: Tue, 11 Jan 2011 22:12:03 +0000 (-0800) Subject: netlink: Log duplicate attributes in nl_policy_parse(). X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=33cada0cf1f24beb79c23328acb2bf9860c34679;p=openvswitch 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 48a52ee3..725bba02 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. */