Replace two asp->peer with prefix_peer(p) which is the same.
authorclaudio <claudio@openbsd.org>
Mon, 6 Aug 2018 08:10:12 +0000 (08:10 +0000)
committerclaudio <claudio@openbsd.org>
Mon, 6 Aug 2018 08:10:12 +0000 (08:10 +0000)
usr.sbin/bgpd/rde.c

index b149451..f548b11 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: rde.c,v 1.408 2018/08/03 16:31:22 claudio Exp $ */
+/*     $OpenBSD: rde.c,v 1.409 2018/08/06 08:10:12 claudio Exp $ */
 
 /*
  * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -2120,7 +2120,7 @@ rde_dump_filter(struct prefix *p, struct ctl_show_rib_request *req)
        if (req->flags & F_CTL_ADJ_IN ||
            !(req->flags & (F_CTL_ADJ_IN|F_CTL_ADJ_OUT))) {
                asp = prefix_aspath(p);
-               if (req->peerid && req->peerid != asp->peer->conf.id)
+               if (req->peerid && req->peerid != prefix_peer(p)->conf.id)
                        return;
                if (req->type == IMSG_CTL_SHOW_RIB_AS &&
                    !aspath_match(asp->aspath->data, asp->aspath->len,
@@ -2882,7 +2882,7 @@ rde_softreconfig_in(struct rib_entry *re, void *bula)
        pt_getaddr(pt, &addr);
        LIST_FOREACH(p, &re->prefix_h, rib_l) {
                asp = prefix_aspath(p);
-               peer = asp->peer;
+               peer = prefix_peer(p);
 
                for (i = RIB_LOC_START; i < rib_size; i++) {
                        rib = &ribs[i];