From: claudio Date: Sat, 24 Oct 2015 08:02:24 +0000 (+0000) Subject: In all other cases of rde_filter_match() we ensure that asp is valid so X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=67a0df4ab471416e55cd7f358dd20390d5558ccf;p=openbsd In all other cases of rde_filter_match() we ensure that asp is valid so do it here as well. --- 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 @@ -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;