]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Filter: Fix minor bug in accessing bgp_path
authorOndrej Zajicek (work) <santiago@crfreenet.org>
Thu, 20 Dec 2018 11:59:55 +0000 (12:59 +0100)
committerOndrej Zajicek (work) <santiago@crfreenet.org>
Thu, 20 Dec 2018 11:59:55 +0000 (12:59 +0100)
Not relevant for regular BGP paths, just for BGP paths added by filters
to e.g. static routes.

filter/filter.c

index 02d3b9603d830618759e1dc0fb5c7e3cfd4889f6..63219daed42de7aea48bf318ef2c949772218c0b 100644 (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 */
       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");
 
       as_path_get_last(e->u.ptr, &as);