0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-22 09:41:54 +00:00

Filter: Fix minor bug in accessing bgp_path

Not relevant for regular BGP paths, just for BGP paths added by filters
to e.g. static routes.
This commit is contained in:
Ondrej Zajicek (work) 2018-12-20 12:59:55 +01:00
parent d82b1a1977
commit 17450df314

View File

@ -1527,7 +1527,7 @@ interpret(struct f_inst *what)
/* 0x02 is a value of BA_AS_PATH, we don't want to include BGP headers */ /* 0x02 is a value of BA_AS_PATH, we don't want to include BGP headers */
eattr *e = ea_find((*f_rte)->attrs->eattrs, EA_CODE(EAP_BGP, 0x02)); eattr *e = ea_find((*f_rte)->attrs->eattrs, EA_CODE(EAP_BGP, 0x02));
if (!e || e->type != EAF_TYPE_AS_PATH) if (!e || ((e->type & EAF_TYPE_MASK) != EAF_TYPE_AS_PATH))
runtime("Missing AS_PATH attribute"); runtime("Missing AS_PATH attribute");
as_path_get_last(e->u.ptr, &as); as_path_get_last(e->u.ptr, &as);