summaryrefslogtreecommitdiff
path: root/bgpd
diff options
context:
space:
mode:
authorGreg Troxel <gdt@ir.bbn.com>2010-09-17 10:47:49 -0400
committerGreg Troxel <gdt@ir.bbn.com>2010-09-17 10:47:49 -0400
commitd3ddb22e902bc4dc175ed6974515f6e14d9be931 (patch)
treee0f0fa91e7814c4814dbbd60352cc073496d71f7 /bgpd
parentcf8a831bcb53b60a7b5c4b26dda7646ebc7506d8 (diff)
Set from even if binfo->extra is NULL.
bgpd/bgp_packet.c:bgp_update_packet(): When extracting the peer, don't fail to extract it because "binfo->extra" is NULL. While one should certainly avoid dereferencing binfo->extra, that's not a good reason not to use binfo->peer. Fixes https://bugzilla.quagga.net/show_bug.cgi?id=497. Patch by Eric Sobocinksi.
Diffstat (limited to 'bgpd')
-rw-r--r--bgpd/bgp_packet.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c
index 488ab441..a5f9552c 100644
--- a/bgpd/bgp_packet.c
+++ b/bgpd/bgp_packet.c
@@ -177,10 +177,11 @@ bgp_update_packet (struct peer *peer, afi_t afi, safi_t safi)
if (rn->prn)
prd = (struct prefix_rd *) &rn->prn->p;
- if (binfo && binfo->extra)
+ if (binfo)
{
- tag = binfo->extra->tag;
from = binfo->peer;
+ if (binfo->extra)
+ tag = binfo->extra->tag;
}
bgp_packet_set_marker (s, BGP_MSG_UPDATE);