summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bgpd/rde.h
diff options
context:
space:
mode:
authorclaudio <claudio@openbsd.org>2020-01-24 05:44:05 +0000
committerclaudio <claudio@openbsd.org>2020-01-24 05:44:05 +0000
commitc84ce86d3ebc0545c07d1e69fd28215c1dc9b995 (patch)
tree3200d582c94b5074cfb1d708f0cc171fc374e7ed /usr.sbin/bgpd/rde.h
parentRename audio_mixer_{read,write} to audio_mixer_{get,set}. (diff)
downloadwireguard-openbsd-c84ce86d3ebc0545c07d1e69fd28215c1dc9b995.tar.xz
wireguard-openbsd-c84ce86d3ebc0545c07d1e69fd28215c1dc9b995.zip
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.h7
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);