claudio noted that this is an else case because we have either a
authorbenno <benno@openbsd.org>
Sat, 10 Feb 2018 04:23:48 +0000 (04:23 +0000)
committerbenno <benno@openbsd.org>
Sat, 10 Feb 2018 04:23:48 +0000 (04:23 +0000)
prefix or a prefix-set.

usr.sbin/bgpd/rde_filter.c

index 7b1a52e..a963162 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: rde_filter.c,v 1.85 2018/02/10 01:24:28 benno Exp $ */
+/*     $OpenBSD: rde_filter.c,v 1.86 2018/02/10 04:23:48 benno Exp $ */
 
 /*
  * Copyright (c) 2004 Claudio Jeker <claudio@openbsd.org>
@@ -490,10 +490,7 @@ rde_filter_match(struct filter_rule *f, struct rde_aspath *asp,
                        }
                }
                return (0);
-       }
-
-       /* XXX must be last because we unconditionally return here */
-       if (f->match.prefix.addr.aid != 0)
+       } else if (f->match.prefix.addr.aid != 0)
                return (rde_test_prefix(&f->match.prefix, prefix, plen));
 
        /* matched somewhen or is anymatch rule  */