summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2015-10-24 08:02:25 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2015-10-24 08:02:25 +0000
commit57f033c2c5ad722e40dd1cd2434468cd58ad9b9e (patch)
tree49b6090e3e81a26b2e0897b9475fc7b0983e259d /usr.sbin/bgpd
parent58f7ab62864103d839a0a934bf2feadc6f2908d4 (diff)
In all other cases of rde_filter_match() we ensure that asp is valid so
do it here as well.
Diffstat (limited to 'usr.sbin/bgpd')
-rw-r--r--usr.sbin/bgpd/rde_filter.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/bgpd/rde_filter.c b/usr.sbin/bgpd/rde_filter.c
index 74d202e22ad..04a4d65318e 100644
--- a/usr.sbin/bgpd/rde_filter.c
+++ b/usr.sbin/bgpd/rde_filter.c
@@ -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;