mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-12-22 17:51:53 +00:00
Don't crash when filter_same() gets called on FILTER_ACCEPT or FILTER_REJECT.
This commit is contained in:
parent
a92bebe0ec
commit
81ce667b7b
@ -557,5 +557,10 @@ filters_postconfig(void)
|
|||||||
int
|
int
|
||||||
filter_same(struct filter *new, struct filter *old)
|
filter_same(struct filter *new, struct filter *old)
|
||||||
{
|
{
|
||||||
|
if (old == new) /* Handle FILTER_ACCEPT and FILTER_REJECT */
|
||||||
|
return 1;
|
||||||
|
if (old == FILTER_ACCEPT || old == FILTER_REJECT ||
|
||||||
|
new == FILTER_ACCEPT || new == FILTER_REJECT)
|
||||||
|
return 0;
|
||||||
return i_same(new->root, old->root);
|
return i_same(new->root, old->root);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user