summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_route.c
diff options
context:
space:
mode:
authorpaul <paul>2003-04-28 17:07:26 +0000
committerpaul <paul>2003-04-28 17:07:26 +0000
commita7182ddbaf0fe97453a9f2dfda5cc65b7fb3a1a8 (patch)
treeca8303e1d66bdc7d5a80e4e94b4fcb062715cabc /bgpd/bgp_route.c
parent47b8ec7ee87e5c8efe552c515523ed60875f3767 (diff)
downloadquagga-zebra.org.20030428.tar.bz2
quagga-zebra.org.20030428.tar.xz
Import of Zebra CVS 20030428-18:07zebra.org.20030428
Diffstat (limited to 'bgpd/bgp_route.c')
-rw-r--r--bgpd/bgp_route.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
index cc7dbfa6..aab85eb3 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -1780,6 +1780,7 @@ bgp_static_update (struct bgp *bgp, struct prefix *p,
struct bgp_info *new;
struct bgp_info info;
struct attr attr;
+ struct attr attr_tmp;
struct attr *attr_new;
int ret;
@@ -1796,23 +1797,26 @@ bgp_static_update (struct bgp *bgp, struct prefix *p,
/* Apply route-map. */
if (bgp_static->rmap.name)
{
+ attr_tmp = attr;
info.peer = bgp->peer_self;
- info.attr = &attr;
+ info.attr = &attr_tmp;
ret = route_map_apply (bgp_static->rmap.map, p, RMAP_BGP, &info);
+
if (ret == RMAP_DENYMATCH)
{
/* Free uninterned attribute. */
- bgp_attr_flush (&attr);
+ bgp_attr_flush (&attr_tmp);
/* Unintern original. */
aspath_unintern (attr.aspath);
bgp_static_withdraw (bgp, p, afi, safi);
return;
}
+ attr_new = bgp_attr_intern (&attr_tmp);
}
-
- attr_new = bgp_attr_intern (&attr);
+ else
+ attr_new = bgp_attr_intern (&attr);
for (ri = rn->info; ri; ri = ri->next)
if (ri->peer == bgp->peer_self && ri->type == ZEBRA_ROUTE_BGP