aboutsummaryrefslogtreecommitdiff
path: root/lib/netlink.c
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2011-01-11 14:12:03 -0800
committerBen Pfaff <blp@nicira.com>2011-01-27 09:26:05 -0800
commit33cada0cf1f24beb79c23328acb2bf9860c34679 (patch)
tree804a7ef457e8b82119919e915eabb3bca41c7681 /lib/netlink.c
parentb18fcf8edd07d7832c16e96f29d44a2961c1e5aa (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.c3
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. */