In all other cases of rde_filter_match() we ensure that asp is valid so
authorclaudio <claudio@openbsd.org>
Sat, 24 Oct 2015 08:02:24 +0000 (08:02 +0000)
committerclaudio <claudio@openbsd.org>
Sat, 24 Oct 2015 08:02:24 +0000 (08:02 +0000)
do it here as well.

usr.sbin/bgpd/rde_filter.c

index 74d202e..04a4d65 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: rde_filter.c,v 1.74 2015/07/16 18:26:04 claudio Exp $ */
+/*     $OpenBSD: rde_filter.c,v 1.75 2015/10/24 08:02:24 claudio Exp $ */
 
 /*
  * Copyright (c) 2004 Claudio Jeker <claudio@openbsd.org>
@@ -358,7 +358,7 @@ rde_filter_match(struct filter_rule *f, struct rde_aspath *asp,
        }
        if (f->match.nexthop.flags != 0) {
                struct bgpd_addr *nexthop, *cmpaddr;
-               if (asp->nexthop == NULL)
+               if (asp != NULL && asp->nexthop == NULL)
                        /* no nexthop, skip */
                        return (0);
                nexthop = &asp->nexthop->exit_nexthop;