diff options
author | Ben Pfaff <blp@nicira.com> | 2011-01-11 14:12:03 -0800 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2011-01-27 09:26:05 -0800 |
commit | 33cada0cf1f24beb79c23328acb2bf9860c34679 (patch) | |
tree | 804a7ef457e8b82119919e915eabb3bca41c7681 /lib/netlink.c | |
parent | b18fcf8edd07d7832c16e96f29d44a2961c1e5aa (diff) |
netlink: Log duplicate attributes in nl_policy_parse().
This made finding one particular bug slightly easier for me.
Reviewed by Justin Pettit.
Diffstat (limited to 'lib/netlink.c')
-rw-r--r-- | lib/netlink.c | 3 |
1 files changed, 3 insertions, 0 deletions
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. */ |