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

filter/filter.c

index 0a2c26b8b2b0a3ef033b02f30aba71554a0e5d53..edf54ec09da31f17b92ba0f598c90d542330f6a1 100644 (file)
@@ -1523,7 +1523,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_eattrs, EA_CODE(PROTOCOL_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);