summaryrefslogtreecommitdiffstats
path: root/proto/bgp/packets.c
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>2000-04-21 14:25:35 +0200
committerMartin Mares <mj@ucw.cz>2000-04-21 14:25:35 +0200
commit2a9e064d7b41ae6e944dd9fbcb18b89e8fda0dba (patch)
treea4c7df02e0857276b4244eebd1b25b807c48eec0 /proto/bgp/packets.c
parentf380aa60faa41872b78155f899518b25933d18b9 (diff)
downloadbird-2a9e064d7b41ae6e944dd9fbcb18b89e8fda0dba.tar
bird-2a9e064d7b41ae6e944dd9fbcb18b89e8fda0dba.zip
If no NLRI's are present in an UPDATE message, parse the attributes, but
don't check presence of mandatory attributes. [draft-09]
Diffstat (limited to 'proto/bgp/packets.c')
-rw-r--r--proto/bgp/packets.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/proto/bgp/packets.c b/proto/bgp/packets.c
index bec2e50..ccaa91c 100644
--- a/proto/bgp/packets.c
+++ b/proto/bgp/packets.c
@@ -305,6 +305,7 @@ bgp_rx_update(struct bgp_conn *conn, byte *pkt, int len)
int withdrawn_len, attr_len, nlri_len, pxlen;
net *n;
rte e;
+ rta *a0;
rta *a = NULL;
DBG("BGP: UPDATE\n");
@@ -341,11 +342,10 @@ bgp_rx_update(struct bgp_conn *conn, byte *pkt, int len)
rte_update(bgp->p.table, n, &bgp->p, NULL);
}
- if (nlri_len)
+ a0 = bgp_decode_attrs(conn, attrs, attr_len, bgp_linpool, nlri_len);
+ if (a0 && nlri_len)
{
- a = bgp_decode_attrs(conn, attrs, attr_len, bgp_linpool);
- if (!a)
- return;
+ a = rta_lookup(a0);
while (nlri_len)
{
rte *e;
@@ -357,9 +357,9 @@ bgp_rx_update(struct bgp_conn *conn, byte *pkt, int len)
e->pflags = 0;
rte_update(bgp->p.table, n, &bgp->p, e);
}
- lp_flush(bgp_linpool);
rta_free(a);
}
+ lp_flush(bgp_linpool);
return;
malformed: