diff options
Diffstat (limited to 'proto/bgp/packets.c')
-rw-r--r-- | proto/bgp/packets.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/proto/bgp/packets.c b/proto/bgp/packets.c index d5397f5f..f358012a 100644 --- a/proto/bgp/packets.c +++ b/proto/bgp/packets.c @@ -725,13 +725,19 @@ bgp_do_rx_update(struct bgp_conn *conn, e->net = n; e->pflags = 0; rte_update(p->p.table, n, &p->p, &p->p, e); + if (bgp_apply_limits(p) < 0) + goto bad2; } + rta_free(a); } -bad: + + return; + + bad: + bgp_error(conn, 3, err, NULL, 0); + bad2: if (a) rta_free(a); - if (err) - bgp_error(conn, 3, err, NULL, 0); return; } @@ -825,6 +831,8 @@ bgp_do_rx_update(struct bgp_conn *conn, e->net = n; e->pflags = 0; rte_update(p->p.table, n, &p->p, &p->p, e); + if (bgp_apply_limits(p) < 0) + goto bad2; } rta_free(a); } @@ -832,8 +840,9 @@ bgp_do_rx_update(struct bgp_conn *conn, return; -bad: + bad: bgp_error(conn, 3, 9, start, len0); + bad2: if (a) rta_free(a); return; |