diff options
author | Martin Mares <mj@ucw.cz> | 2000-04-21 12:25:35 +0000 |
---|---|---|
committer | Martin Mares <mj@ucw.cz> | 2000-04-21 12:25:35 +0000 |
commit | 2a9e064d7b41ae6e944dd9fbcb18b89e8fda0dba (patch) | |
tree | a4c7df02e0857276b4244eebd1b25b807c48eec0 /proto/bgp/packets.c | |
parent | f380aa60faa41872b78155f899518b25933d18b9 (diff) |
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.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/proto/bgp/packets.c b/proto/bgp/packets.c index bec2e501..ccaa91c1 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: |