diff options
author | Yousong Zhou <yszhou4tech@gmail.com> | 2020-10-21 10:50:54 +0800 |
---|---|---|
committer | Yousong Zhou <yszhou4tech@gmail.com> | 2020-10-22 10:22:21 +0800 |
commit | 3d7bf6043bc92212da7b98af265d1587ff4abe05 (patch) | |
tree | cbef8c7bed19ed266c72cc77f327f8838b91528a /proto.c | |
parent | 5722218eb523133b688dcc4e5880a7eaddc26e11 (diff) |
device_addr: record address index as in the blob
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
Acked-by: Hans Dedecker <dedeckeh@gmail.com>
Diffstat (limited to 'proto.c')
-rw-r--r-- | proto.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -172,6 +172,7 @@ parse_static_address_option(struct interface *iface, struct blob_attr *attr, interface_add_error(iface, "proto", "INVALID_ADDRESS", &str, 1); return -1; } + addr->index = n_addr; n_addr++; vlist_add(&iface->proto_ip.addr, &addr->node, &addr->flags); } @@ -272,6 +273,7 @@ parse_address_list(struct interface *iface, struct blob_attr *attr, bool v6, if (!addr) return -1; + addr->index = n_addr; n_addr++; vlist_add(&iface->proto_ip.addr, &addr->node, &addr->flags); } |