Don't forget changing proto->name to point to name in new configuration
(to avoid the name being freed with the old config). Also remember to add proto_pipe to protocol_list.
This commit is contained in:
parent
ca0edc5395
commit
26368f656c
1 changed files with 4 additions and 0 deletions
|
@ -248,6 +248,7 @@ protos_commit(struct config *new, struct config *old, int force_reconfig)
|
||||||
{
|
{
|
||||||
DBG("\t%s: same\n", oc->name);
|
DBG("\t%s: same\n", oc->name);
|
||||||
p->cf = nc;
|
p->cf = nc;
|
||||||
|
p->name = nc->name;
|
||||||
nc->proto = p;
|
nc->proto = p;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -371,6 +372,9 @@ protos_build(void)
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_OSPF
|
#ifdef CONFIG_OSPF
|
||||||
add_tail(&protocol_list, &proto_ospf.n);
|
add_tail(&protocol_list, &proto_ospf.n);
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_PIPE
|
||||||
|
add_tail(&protocol_list, &proto_pipe.n);
|
||||||
#endif
|
#endif
|
||||||
proto_pool = rp_new(&root_pool, "Protocols");
|
proto_pool = rp_new(&root_pool, "Protocols");
|
||||||
proto_flush_event = ev_new(proto_pool);
|
proto_flush_event = ev_new(proto_pool);
|
||||||
|
|
Loading…
Reference in a new issue