mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-12-22 09:41:54 +00:00
Don't crash when reporting deleted routes.
Set preferences correctly.
This commit is contained in:
parent
92ef4fa719
commit
1151401e2b
@ -209,6 +209,7 @@ krt_learn_announce_update(struct krt_proto *p, rte *e)
|
|||||||
net *nn = net_get(p->p.table, n->n.prefix, n->n.pxlen);
|
net *nn = net_get(p->p.table, n->n.prefix, n->n.pxlen);
|
||||||
ee->net = nn;
|
ee->net = nn;
|
||||||
ee->pflags = 0;
|
ee->pflags = 0;
|
||||||
|
ee->pref = p->p.preference;
|
||||||
ee->u.krt = e->u.krt;
|
ee->u.krt = e->u.krt;
|
||||||
rte_update(p->p.table, nn, &p->p, ee);
|
rte_update(p->p.table, nn, &p->p, ee);
|
||||||
}
|
}
|
||||||
@ -580,7 +581,7 @@ krt_prune(struct krt_proto *p)
|
|||||||
krt_set_notify(p, n, new, old);
|
krt_set_notify(p, n, new, old);
|
||||||
break;
|
break;
|
||||||
case KRF_DELETE:
|
case KRF_DELETE:
|
||||||
krt_trace_in(p, new, "deleting");
|
krt_trace_in(p, old, "deleting");
|
||||||
krt_set_notify(p, n, NULL, old);
|
krt_set_notify(p, n, NULL, old);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user