Device protocol supports reconfiguration.
This commit is contained in:
parent
26368f656c
commit
88dc89f991
1 changed files with 10 additions and 0 deletions
|
@ -77,8 +77,18 @@ dev_init(struct proto_config *c)
|
|||
return p;
|
||||
}
|
||||
|
||||
static int
|
||||
dev_reconfigure(struct proto *p, struct proto_config *new)
|
||||
{
|
||||
struct rt_dev_config *o = (struct rt_dev_config *) p->cf;
|
||||
struct rt_dev_config *n = (struct rt_dev_config *) new;
|
||||
|
||||
return iface_patts_equal(&o->iface_list, &n->iface_list, NULL);
|
||||
}
|
||||
|
||||
struct protocol proto_device = {
|
||||
name: "Direct",
|
||||
priority: 90,
|
||||
init: dev_init,
|
||||
reconfigure: dev_reconfigure
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue