2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 14:25:26 +00:00

lib: Indicate if netlink message had labels.

Conntrack update events include labels only if they have changed.
Record the presence of labels in the netlink message to OVS internal
representation, so that the user may keep the old labels when an
update does not modify them.

Fixes: 6830a0c0e6 ("netlink-conntrack: New module.")
Signed-off-by: Jarno Rajahalme <jarno@ovn.org>
Acked-by: Joe Stringer <joe@ovn.org>
This commit is contained in:
Jarno Rajahalme
2017-03-09 14:09:08 -08:00
parent 2e0b0a4ace
commit e7237700d0
2 changed files with 2 additions and 0 deletions

View File

@@ -780,6 +780,7 @@ nl_ct_attrs_to_ct_dpif_entry(struct ct_dpif_entry *entry,
entry->mark = ntohl(nl_attr_get_be32(attrs[CTA_MARK]));
}
if (attrs[CTA_LABELS]) {
entry->have_labels = true;
memcpy(&entry->labels, nl_attr_get(attrs[CTA_LABELS]),
MIN(sizeof entry->labels, nl_attr_get_size(attrs[CTA_LABELS])));
}