diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2020-01-24 05:44:06 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2020-01-24 05:44:06 +0000 |
commit | 18714bc720466665754233878ce5dc928c5e264c (patch) | |
tree | 1748273ea31fe1a803acc9dbc4715f1207c3edc1 /usr.sbin/bgpd/rde.h | |
parent | e77c61be3d8b544fc0434e23b24bcef0665b0e8a (diff) |
Implement 'max-prefix NUM out' to limit the number of announced prefixes.
This is an easy safety switch to not leak full tables to upstreams and
peers. If the limit is hit a Cease notification is sent and the session
is closed.
This implements most of https://tools.ietf.org/html/draft-sa-idr-maxprefix-00
OK job@
Diffstat (limited to 'usr.sbin/bgpd/rde.h')
-rw-r--r-- | usr.sbin/bgpd/rde.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.sbin/bgpd/rde.h b/usr.sbin/bgpd/rde.h index 776c37a03f2..6cba62d44d7 100644 --- a/usr.sbin/bgpd/rde.h +++ b/usr.sbin/bgpd/rde.h @@ -1,4 +1,4 @@ -/* $OpenBSD: rde.h,v 1.232 2020/01/09 15:50:34 claudio Exp $ */ +/* $OpenBSD: rde.h,v 1.233 2020/01/24 05:44:05 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Claudio Jeker <claudio@openbsd.org> and @@ -97,7 +97,8 @@ struct rde_peer { u_int64_t prefix_sent_update; u_int64_t prefix_sent_withdraw; u_int64_t prefix_sent_eor; - u_int32_t prefix_cnt; /* # of prefixes */ + u_int32_t prefix_cnt; + u_int32_t prefix_out_cnt; u_int32_t remote_bgpid; /* host byte order! */ u_int32_t up_nlricnt; u_int32_t up_wcnt; @@ -359,6 +360,8 @@ int mrt_dump_v2_hdr(struct mrt *, struct bgpd_config *, void mrt_dump_upcall(struct rib_entry *, void *); /* rde.c */ +void rde_update_err(struct rde_peer *, u_int8_t , u_int8_t, + void *, u_int16_t); void rde_update_log(const char *, u_int16_t, const struct rde_peer *, const struct bgpd_addr *, const struct bgpd_addr *, u_int8_t); |