projects
/
project
/
netifd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5722218
)
device_addr: record address index as in the blob
author
Yousong Zhou
<
[email protected]
>
Wed, 21 Oct 2020 02:50:54 +0000
(10:50 +0800)
committer
Yousong Zhou
<
[email protected]
>
Thu, 22 Oct 2020 02:22:21 +0000
(10:22 +0800)
Signed-off-by: Yousong Zhou <
[email protected]
>
Acked-by: Hans Dedecker <
[email protected]
>
interface-ip.h
patch
|
blob
|
history
proto.c
patch
|
blob
|
history
diff --git
a/interface-ip.h
b/interface-ip.h
index 5ab92996999c791843c9bd8d4a6bfc8f1f84750f..b17ad94c5159a8720fe2044573aac7dedf0fcf65 100644
(file)
--- a/
interface-ip.h
+++ b/
interface-ip.h
@@
-127,6
+127,7
@@
struct device_addr {
struct vlist_node node;
bool enabled;
bool failed;
+ int index;
unsigned int policy_table;
struct device_route subnet;
diff --git
a/proto.c
b/proto.c
index d80cae0d9c33b25fd375e31ba1ca31d2b5d85684..f7d27aad68dc009d44a6be41490c963267c2fdc3 100644
(file)
--- a/
proto.c
+++ b/
proto.c
@@
-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);
}