projects
/
project
/
mdnsd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d45c443
)
interface: fix interface memory corruption
openwrt-23.05
author
Felix Fietkau
<
[email protected]
>
Tue, 21 Nov 2023 05:45:09 +0000
(06:45 +0100)
committer
Petr Štetiar
<
[email protected]
>
Mon, 4 Mar 2024 07:54:49 +0000
(07:54 +0000)
- set vlist keep_old=true, because the iface_update_cb expects it
- update ifindex on reload
Fixes: openwrt/openwrt/issues/14120
Signed-off-by: Felix Fietkau <
[email protected]
>
(cherry picked from commit
9040335e102b83a2dd7df64aa88d0dd762d78a86
)
interface.c
patch
|
blob
|
history
diff --git
a/interface.c
b/interface.c
index e98eddeb2467352a3c35c0fed68edbf499699893..5b1591c3704b775b13585453514ad1276266d3bc 100644
(file)
--- a/
interface.c
+++ b/
interface.c
@@
-464,6
+464,7
@@
iface_update_cb(struct vlist_tree *tree, struct vlist_node *node_new,
cache_cleanup(if_old);
free(if_old->addrs.v4);
if_old->addrs = if_new->addrs;
+ if_old->ifindex = if_new->ifindex;
free(if_new);
return;
}
@@
-669,4
+670,4
@@
struct interface *interface_get(const char *name, enum umdns_socket_type type)
return iface;
}
-VLIST_TREE(interfaces, avl_strcmp, iface_update_cb,
fals
e, false);
+VLIST_TREE(interfaces, avl_strcmp, iface_update_cb,
tru
e, false);