summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2022-07-28 13:11:52 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2022-07-28 13:11:52 +0000
commitf16ab620789469d0e87513e6d71b17a1d7f2e601 (patch)
tree1c1adbfa48da54c2ae1943e6111338500d1a04ba
parent68b1b814d77264bb243caf671ff0d91172a89160 (diff)
whitespace found during a read-thru; ok claudio
-rw-r--r--usr.sbin/bgpd/bgpd.c6
-rw-r--r--usr.sbin/bgpd/bgpd.h16
-rw-r--r--usr.sbin/bgpd/control.c4
-rw-r--r--usr.sbin/bgpd/kroute.c8
-rw-r--r--usr.sbin/bgpd/logmsg.c4
-rw-r--r--usr.sbin/bgpd/mrt.c4
-rw-r--r--usr.sbin/bgpd/parse.y12
-rw-r--r--usr.sbin/bgpd/pfkey.c4
-rw-r--r--usr.sbin/bgpd/printconf.c8
-rw-r--r--usr.sbin/bgpd/rde.c18
-rw-r--r--usr.sbin/bgpd/rde.h30
-rw-r--r--usr.sbin/bgpd/rde_attr.c6
-rw-r--r--usr.sbin/bgpd/rde_community.c4
-rw-r--r--usr.sbin/bgpd/rde_filter.c6
-rw-r--r--usr.sbin/bgpd/rde_peer.c4
-rw-r--r--usr.sbin/bgpd/rde_rib.c8
-rw-r--r--usr.sbin/bgpd/rde_sets.c4
-rw-r--r--usr.sbin/bgpd/session.c24
-rw-r--r--usr.sbin/bgpd/session.h6
19 files changed, 88 insertions, 88 deletions
diff --git a/usr.sbin/bgpd/bgpd.c b/usr.sbin/bgpd/bgpd.c
index 2a2b515fdc6..313c959f8b0 100644
--- a/usr.sbin/bgpd/bgpd.c
+++ b/usr.sbin/bgpd/bgpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bgpd.c,v 1.252 2022/07/23 10:24:00 claudio Exp $ */
+/* $OpenBSD: bgpd.c,v 1.253 2022/07/28 13:11:48 deraadt Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -1316,7 +1316,7 @@ bgpd_rtr_connect(struct rtr_config *r)
ce->id = r->id;
ce->fd = socket(aid2af(r->remote_addr.aid),
- SOCK_STREAM | SOCK_CLOEXEC | SOCK_NONBLOCK, IPPROTO_TCP);
+ SOCK_STREAM | SOCK_CLOEXEC | SOCK_NONBLOCK, IPPROTO_TCP);
if (ce->fd == -1) {
log_warn("rtr %s", r->descr);
free(ce);
@@ -1365,7 +1365,7 @@ bgpd_rtr_connect_done(int fd, struct bgpd_config *conf)
}
if (ce == NULL)
fatalx("connect entry not found");
-
+
TAILQ_REMOVE(&connect_queue, ce, entry);
connect_cnt--;
diff --git a/usr.sbin/bgpd/bgpd.h b/usr.sbin/bgpd/bgpd.h
index 6a8013e6695..981a4424f57 100644
--- a/usr.sbin/bgpd/bgpd.h
+++ b/usr.sbin/bgpd/bgpd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: bgpd.h,v 1.447 2022/07/28 10:41:18 claudio Exp $ */
+/* $OpenBSD: bgpd.h,v 1.448 2022/07/28 13:11:48 deraadt Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -518,7 +518,7 @@ struct ctl_show_rtr {
uint32_t expire;
int session_id;
in_addr_t remote_port;
- enum rtr_error last_sent_error;
+ enum rtr_error last_sent_error;
enum rtr_error last_recv_error;
char last_sent_msg[REASON_LEN];
char last_recv_msg[REASON_LEN];
@@ -1262,7 +1262,7 @@ struct mrt_config {
void send_nexthop_update(struct kroute_nexthop *);
void send_imsg_session(int, pid_t, void *, uint16_t);
int send_network(int, struct network_config *,
- struct filter_set_head *);
+ struct filter_set_head *);
int bgpd_oknexthop(struct kroute_full *);
void set_pollfd(struct pollfd *, struct imsgbuf *);
int handle_pollfd(struct pollfd *, struct imsgbuf *);
@@ -1347,7 +1347,7 @@ void pftable_unref(uint16_t);
uint16_t pftable_ref(uint16_t);
/* parse.y */
-int cmdline_symset(char *);
+int cmdline_symset(char *);
struct prefixset *find_prefixset(char *, struct prefixset_head *);
struct bgpd_config *parse_config(char *, struct peer_head *,
struct rtr_config_head *);
@@ -1420,13 +1420,13 @@ int aspath_verify(void *, uint16_t, int, int);
#define AS_ERR_SOFT -4
u_char *aspath_inflate(void *, uint16_t, uint16_t *);
int nlri_get_prefix(u_char *, uint16_t, struct bgpd_addr *,
- uint8_t *);
+ uint8_t *);
int nlri_get_prefix6(u_char *, uint16_t, struct bgpd_addr *,
- uint8_t *);
+ uint8_t *);
int nlri_get_vpn4(u_char *, uint16_t, struct bgpd_addr *,
- uint8_t *, int);
+ uint8_t *, int);
int nlri_get_vpn6(u_char *, uint16_t, struct bgpd_addr *,
- uint8_t *, int);
+ uint8_t *, int);
int prefix_compare(const struct bgpd_addr *,
const struct bgpd_addr *, int);
void inet4applymask(struct in_addr *, const struct in_addr *, int);
diff --git a/usr.sbin/bgpd/control.c b/usr.sbin/bgpd/control.c
index 2b73a481b9d..d67606e252b 100644
--- a/usr.sbin/bgpd/control.c
+++ b/usr.sbin/bgpd/control.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: control.c,v 1.106 2022/02/04 12:01:12 claudio Exp $ */
+/* $OpenBSD: control.c,v 1.107 2022/07/28 13:11:48 deraadt Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -73,7 +73,7 @@ control_init(int restricted, char *path)
mode_t old_umask, mode;
if ((fd = socket(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC | SOCK_NONBLOCK,
- 0)) == -1) {
+ 0)) == -1) {
log_warn("control_init: socket");
return (-1);
}
diff --git a/usr.sbin/bgpd/kroute.c b/usr.sbin/bgpd/kroute.c
index 618fd15efab..39646b3112d 100644
--- a/usr.sbin/bgpd/kroute.c
+++ b/usr.sbin/bgpd/kroute.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kroute.c,v 1.283 2022/07/27 17:23:17 claudio Exp $ */
+/* $OpenBSD: kroute.c,v 1.284 2022/07/28 13:11:48 deraadt Exp $ */
/*
* Copyright (c) 2022 Claudio Jeker <claudio@openbsd.org>
@@ -141,14 +141,14 @@ int kredist_compare(struct kredist_node *, struct kredist_node *);
int kif_compare(struct kif_node *, struct kif_node *);
struct kroute *kroute_find(struct ktable *, const struct bgpd_addr *,
- uint8_t, uint8_t);
+ uint8_t, uint8_t);
struct kroute *kroute_matchgw(struct kroute *, struct bgpd_addr *);
int kroute_insert(struct ktable *, struct kroute_full *);
int kroute_remove(struct ktable *, struct kroute *);
void kroute_clear(struct ktable *);
struct kroute6 *kroute6_find(struct ktable *, const struct bgpd_addr *,
- uint8_t, uint8_t);
+ uint8_t, uint8_t);
struct kroute6 *kroute6_matchgw(struct kroute6 *, struct bgpd_addr *);
int kroute6_remove(struct ktable *, struct kroute6 *);
void kroute6_clear(struct ktable *);
@@ -1128,7 +1128,7 @@ kr_send_dependon(struct kif *kif)
sdon.depend_state = kif->depend_state;
send_imsg_session(IMSG_SESSION_DEPENDON, 0, &sdon, sizeof(sdon));
}
-
+
void
kr_ifinfo(char *ifname)
{
diff --git a/usr.sbin/bgpd/logmsg.c b/usr.sbin/bgpd/logmsg.c
index 688bd9ee86f..605a750e802 100644
--- a/usr.sbin/bgpd/logmsg.c
+++ b/usr.sbin/bgpd/logmsg.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: logmsg.c,v 1.7 2022/06/28 11:42:41 claudio Exp $ */
+/* $OpenBSD: logmsg.c,v 1.8 2022/07/28 13:11:48 deraadt Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -150,7 +150,7 @@ log_notification(const struct peer *peer, uint8_t errcode, uint8_t subcode,
suberrname = suberr_header_names[subcode];
break;
case ERR_OPEN:
- if (subcode >= sizeof(suberr_open_names) / sizeof(char *) ||
+ if (subcode >= sizeof(suberr_open_names) / sizeof(char *) ||
suberr_open_names[subcode] == NULL)
uk = 1;
else
diff --git a/usr.sbin/bgpd/mrt.c b/usr.sbin/bgpd/mrt.c
index f129e82b65b..bca78b8d013 100644
--- a/usr.sbin/bgpd/mrt.c
+++ b/usr.sbin/bgpd/mrt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mrt.c,v 1.107 2022/03/22 10:53:08 claudio Exp $ */
+/* $OpenBSD: mrt.c,v 1.108 2022/07/28 13:11:48 deraadt Exp $ */
/*
* Copyright (c) 2003, 2004 Claudio Jeker <claudio@openbsd.org>
@@ -416,7 +416,7 @@ mrt_dump_entry_mp(struct mrt *mrt, struct prefix *p, uint16_t snum,
/* XXX is this for peer self? */
aid = peer->remote_addr.aid == AID_UNSPEC ? p->pt->aid :
- peer->remote_addr.aid;
+ peer->remote_addr.aid;
switch (aid) {
case AID_INET:
case AID_VPN_IPv4:
diff --git a/usr.sbin/bgpd/parse.y b/usr.sbin/bgpd/parse.y
index 676c3d18593..cb78e0f8f43 100644
--- a/usr.sbin/bgpd/parse.y
+++ b/usr.sbin/bgpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.433 2022/07/21 12:34:19 claudio Exp $ */
+/* $OpenBSD: parse.y,v 1.434 2022/07/28 13:11:49 deraadt Exp $ */
/*
* Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -368,7 +368,7 @@ string : string STRING {
| STRING
;
-yesno : STRING {
+yesno : STRING {
if (!strcmp($1, "yes"))
$$ = 1;
else if (!strcmp($1, "no"))
@@ -2175,11 +2175,11 @@ filter_prefix_m : filter_prefix_l
| '{' filter_prefix_l '}' { $$ = $2; }
| '{' filter_prefix_l '}' filter_prefix_m
{
- struct filter_prefix_l *p;
+ struct filter_prefix_l *p;
/* merge, both can be lists */
for (p = $2; p != NULL && p->next != NULL; p = p->next)
- ; /* nothing */
+ ; /* nothing */
if (p != NULL)
p->next = $4;
$$ = $2;
@@ -3862,7 +3862,7 @@ getcommunity(char *s, int large, uint32_t *val, uint32_t *flag)
*flag = COMMUNITY_NEIGHBOR_AS;
return 0;
} else if (strcmp(s, "local-as") == 0) {
- *flag = COMMUNITY_LOCAL_AS;
+ *flag = COMMUNITY_LOCAL_AS;
return 0;
}
if (large)
@@ -4494,7 +4494,7 @@ expand_rule(struct filter_rule *rule, struct filter_rib_l *rib,
if (rb != NULL)
strlcpy(r->rib, rb->name,
- sizeof(r->rib));
+ sizeof(r->rib));
if (p != NULL)
memcpy(&r->peer, &p->p,
diff --git a/usr.sbin/bgpd/pfkey.c b/usr.sbin/bgpd/pfkey.c
index 21e509833c0..ee4d85de54f 100644
--- a/usr.sbin/bgpd/pfkey.c
+++ b/usr.sbin/bgpd/pfkey.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfkey.c,v 1.65 2022/06/16 09:51:07 claudio Exp $ */
+/* $OpenBSD: pfkey.c,v 1.66 2022/07/28 13:11:50 deraadt Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -864,7 +864,7 @@ tcp_md5_check(int fd, struct peer *p)
if (getsockopt(fd, IPPROTO_TCP, TCP_MD5SIG,
&opt, &len) == -1)
fatal("getsockopt TCP_MD5SIG");
- if (!opt) { /* non-md5'd connection! */
+ if (!opt) { /* non-md5'd connection! */
log_peer_warnx(&p->conf,
"connection attempt without md5 signature");
return -1;
diff --git a/usr.sbin/bgpd/printconf.c b/usr.sbin/bgpd/printconf.c
index 8b017df5d21..11cd2065f03 100644
--- a/usr.sbin/bgpd/printconf.c
+++ b/usr.sbin/bgpd/printconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: printconf.c,v 1.156 2022/07/11 17:08:21 claudio Exp $ */
+/* $OpenBSD: printconf.c,v 1.157 2022/07/28 13:11:50 deraadt Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -637,10 +637,10 @@ print_peer(struct peer_config *p, struct bgpd_config *conf, const char *c)
printf("%s\tpassive\n", c);
if (p->local_addr_v4.aid)
printf("%s\tlocal-address %s\n", c,
- log_addr(&p->local_addr_v4));
+ log_addr(&p->local_addr_v4));
if (p->local_addr_v6.aid)
printf("%s\tlocal-address %s\n", c,
- log_addr(&p->local_addr_v6));
+ log_addr(&p->local_addr_v6));
if (p->remote_port != BGP_PORT)
printf("%s\tport %hu\n", c, p->remote_port);
if (p->max_prefix) {
@@ -809,7 +809,7 @@ print_announce(struct peer_config *p, const char *c)
printf("%s\tannounce add-path recv yes\n", c);
if (p->capabilities.add_path[0] & CAPA_AP_SEND) {
printf("%s\tannounce add-path send %s", c,
- print_addpath_mode(p->eval.mode));
+ print_addpath_mode(p->eval.mode));
if (p->eval.extrapaths != 0)
printf(" plus %d", p->eval.extrapaths);
if (p->eval.maxpaths != 0)
diff --git a/usr.sbin/bgpd/rde.c b/usr.sbin/bgpd/rde.c
index 7c5f83c538f..f08b23ac62b 100644
--- a/usr.sbin/bgpd/rde.c
+++ b/usr.sbin/bgpd/rde.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde.c,v 1.559 2022/07/25 16:37:55 claudio Exp $ */
+/* $OpenBSD: rde.c,v 1.560 2022/07/28 13:11:50 deraadt Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -51,20 +51,20 @@ void rde_dispatch_imsg_rtr(struct imsgbuf *);
void rde_dispatch_imsg_peer(struct rde_peer *, void *);
void rde_update_dispatch(struct rde_peer *, struct imsg *);
int rde_update_update(struct rde_peer *, uint32_t,
- struct filterstate *, struct bgpd_addr *, uint8_t);
+ struct filterstate *, struct bgpd_addr *, uint8_t);
void rde_update_withdraw(struct rde_peer *, uint32_t,
- struct bgpd_addr *, uint8_t);
+ struct bgpd_addr *, uint8_t);
int rde_attr_parse(u_char *, uint16_t, struct rde_peer *,
- struct filterstate *, struct mpattr *);
+ struct filterstate *, struct mpattr *);
int rde_attr_add(struct filterstate *, u_char *, uint16_t);
uint8_t rde_attr_missing(struct rde_aspath *, int, uint16_t);
int rde_get_mp_nexthop(u_char *, uint16_t, uint8_t,
- struct filterstate *);
+ struct filterstate *);
void rde_as4byte_fixup(struct rde_peer *, struct rde_aspath *);
void rde_reflector(struct rde_peer *, struct rde_aspath *);
void rde_dump_ctx_new(struct ctl_show_rib_request *, pid_t,
- enum imsg_type);
+ enum imsg_type);
void rde_dump_ctx_throttle(pid_t, int);
void rde_dump_ctx_terminate(pid_t);
void rde_dump_mrt_new(struct mrt *, pid_t, int);
@@ -86,9 +86,9 @@ void rde_update_queue_runner(void);
void rde_update6_queue_runner(uint8_t);
struct rde_prefixset *rde_find_prefixset(char *, struct rde_prefixset_head *);
void rde_mark_prefixsets_dirty(struct rde_prefixset_head *,
- struct rde_prefixset_head *);
+ struct rde_prefixset_head *);
uint8_t rde_roa_validity(struct rde_prefixset *,
- struct bgpd_addr *, uint8_t, uint32_t);
+ struct bgpd_addr *, uint8_t, uint32_t);
static void rde_peer_recv_eor(struct rde_peer *, uint8_t);
static void rde_peer_send_eor(struct rde_peer *, uint8_t);
@@ -4056,7 +4056,7 @@ rde_peer_send_rrefresh(struct rde_peer *peer, uint8_t aid, uint8_t subtype)
struct route_refresh rr;
/* not strickly needed, the SE checks as well */
- if (peer->capa.enhanced_rr == 0)
+ if (peer->capa.enhanced_rr == 0)
return;
switch (subtype) {
diff --git a/usr.sbin/bgpd/rde.h b/usr.sbin/bgpd/rde.h
index d6efbc1bfa9..8d85e997032 100644
--- a/usr.sbin/bgpd/rde.h
+++ b/usr.sbin/bgpd/rde.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde.h,v 1.260 2022/07/25 16:37:55 claudio Exp $ */
+/* $OpenBSD: rde.h,v 1.261 2022/07/28 13:11:51 deraadt Exp $ */
/*
* Copyright (c) 2003, 2004 Claudio Jeker <claudio@openbsd.org> and
@@ -388,10 +388,10 @@ void mrt_dump_upcall(struct rib_entry *, void *);
/* rde.c */
void rde_update_err(struct rde_peer *, uint8_t , uint8_t,
- void *, uint16_t);
+ void *, uint16_t);
void rde_update_log(const char *, uint16_t,
- const struct rde_peer *, const struct bgpd_addr *,
- const struct bgpd_addr *, uint8_t);
+ const struct rde_peer *, const struct bgpd_addr *,
+ const struct bgpd_addr *, uint8_t);
void rde_send_kroute_flush(struct rib *);
void rde_send_kroute(struct rib *, struct prefix *, struct prefix *);
void rde_send_nexthop(struct bgpd_addr *, int);
@@ -432,14 +432,14 @@ void peer_imsg_flush(struct rde_peer *);
/* rde_attr.c */
int attr_write(void *, uint16_t, uint8_t, uint8_t, void *,
- uint16_t);
+ uint16_t);
int attr_writebuf(struct ibuf *, uint8_t, uint8_t, void *,
- uint16_t);
+ uint16_t);
void attr_init(uint32_t);
void attr_shutdown(void);
void attr_hash_stats(struct rde_hashstats *);
int attr_optadd(struct rde_aspath *, uint8_t, uint8_t,
- void *, uint16_t);
+ void *, uint16_t);
struct attr *attr_optget(const struct rde_aspath *, uint8_t);
void attr_copy(struct rde_aspath *, const struct rde_aspath *);
int attr_compare(struct rde_aspath *, struct rde_aspath *);
@@ -523,9 +523,9 @@ int community_to_rd(struct community *, uint64_t *);
int prefix_eligible(struct prefix *);
struct prefix *prefix_best(struct rib_entry *);
void prefix_evaluate(struct rib_entry *, struct prefix *,
- struct prefix *);
+ struct prefix *);
void prefix_evaluate_nexthop(struct prefix *, enum nexthop_state,
- enum nexthop_state);
+ enum nexthop_state);
/* rde_filter.c */
void rde_apply_set(struct filter_set_head *, struct rde_peer *,
@@ -613,11 +613,11 @@ struct prefix *prefix_adjout_get(struct rde_peer *, uint32_t,
struct prefix *prefix_match(struct rde_peer *, struct bgpd_addr *);
struct prefix *prefix_adjout_match(struct rde_peer *, struct bgpd_addr *);
struct prefix *prefix_adjout_lookup(struct rde_peer *, struct bgpd_addr *,
- int);
+ int);
struct prefix *prefix_adjout_next(struct rde_peer *, struct prefix *);
int prefix_update(struct rib *, struct rde_peer *, uint32_t,
- uint32_t, struct filterstate *, struct bgpd_addr *,
- int, uint8_t);
+ uint32_t, struct filterstate *, struct bgpd_addr *,
+ int, uint8_t);
int prefix_withdraw(struct rib *, struct rde_peer *, uint32_t,
struct bgpd_addr *, int);
void prefix_add_eor(struct rde_peer *, uint8_t);
@@ -707,11 +707,11 @@ int nexthop_compare(struct nexthop *, struct nexthop *);
/* rde_update.c */
void up_init(struct rde_peer *);
void up_generate_updates(struct filter_head *, struct rde_peer *,
- struct prefix *, struct prefix *);
+ struct prefix *, struct prefix *);
void up_generate_addpath(struct filter_head *, struct rde_peer *,
- struct prefix *, struct prefix *);
+ struct prefix *, struct prefix *);
void up_generate_default(struct filter_head *, struct rde_peer *,
- uint8_t);
+ uint8_t);
int up_is_eor(struct rde_peer *, uint8_t);
int up_dump_withdraws(u_char *, int, struct rde_peer *, uint8_t);
int up_dump_mp_unreach(u_char *, int, struct rde_peer *, uint8_t);
diff --git a/usr.sbin/bgpd/rde_attr.c b/usr.sbin/bgpd/rde_attr.c
index 62f8689aa83..b6c14082e43 100644
--- a/usr.sbin/bgpd/rde_attr.c
+++ b/usr.sbin/bgpd/rde_attr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde_attr.c,v 1.126 2022/02/06 09:51:19 claudio Exp $ */
+/* $OpenBSD: rde_attr.c,v 1.127 2022/07/28 13:11:51 deraadt Exp $ */
/*
* Copyright (c) 2004 Claudio Jeker <claudio@openbsd.org>
@@ -445,7 +445,7 @@ static uint16_t aspath_count(const void *, uint16_t);
static uint32_t aspath_extract_origin(const void *, uint16_t);
static uint16_t aspath_countlength(struct aspath *, uint16_t, int);
static void aspath_countcopy(struct aspath *, uint16_t, uint8_t *,
- uint16_t, int);
+ uint16_t, int);
struct aspath *aspath_lookup(const void *, uint16_t);
struct aspath_table {
@@ -1074,7 +1074,7 @@ aspath_prepend(struct aspath *asp, uint32_t as, int quantum, uint16_t *len)
*/
u_char *
aspath_override(struct aspath *asp, uint32_t neighbor_as, uint32_t local_as,
- uint16_t *len)
+ uint16_t *len)
{
u_char *p, *seg, *nseg;
uint32_t as;
diff --git a/usr.sbin/bgpd/rde_community.c b/usr.sbin/bgpd/rde_community.c
index bdf0ce462d6..660b29716fe 100644
--- a/usr.sbin/bgpd/rde_community.c
+++ b/usr.sbin/bgpd/rde_community.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde_community.c,v 1.6 2022/05/31 09:45:33 claudio Exp $ */
+/* $OpenBSD: rde_community.c,v 1.7 2022/07/28 13:11:51 deraadt Exp $ */
/*
* Copyright (c) 2019 Claudio Jeker <claudio@openbsd.org>
@@ -290,7 +290,7 @@ community_count(struct rde_community *comm, uint8_t type)
{
size_t l;
int count = 0;
-
+
/* use the fact that the array is ordered by type */
switch (type) {
case COMMUNITY_TYPE_BASIC:
diff --git a/usr.sbin/bgpd/rde_filter.c b/usr.sbin/bgpd/rde_filter.c
index c2c21ac062d..123b23ba41e 100644
--- a/usr.sbin/bgpd/rde_filter.c
+++ b/usr.sbin/bgpd/rde_filter.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde_filter.c,v 1.128 2022/05/31 09:45:33 claudio Exp $ */
+/* $OpenBSD: rde_filter.c,v 1.129 2022/07/28 13:11:51 deraadt Exp $ */
/*
* Copyright (c) 2004 Claudio Jeker <claudio@openbsd.org>
@@ -128,8 +128,8 @@ rde_apply_set(struct filter_set_head *sh, struct rde_peer *peer,
case ACTION_SET_AS_OVERRIDE:
if (from == NULL)
break;
- np = aspath_override(state->aspath.aspath,
- from->conf.remote_as, from->conf.local_as, &nl);
+ np = aspath_override(state->aspath.aspath,
+ from->conf.remote_as, from->conf.local_as, &nl);
aspath_put(state->aspath.aspath);
state->aspath.aspath = aspath_get(np, nl);
free(np);
diff --git a/usr.sbin/bgpd/rde_peer.c b/usr.sbin/bgpd/rde_peer.c
index 7572c6c240b..f5d9bc3c6ac 100644
--- a/usr.sbin/bgpd/rde_peer.c
+++ b/usr.sbin/bgpd/rde_peer.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde_peer.c,v 1.19 2022/07/11 17:08:21 claudio Exp $ */
+/* $OpenBSD: rde_peer.c,v 1.20 2022/07/28 13:11:51 deraadt Exp $ */
/*
* Copyright (c) 2019 Claudio Jeker <claudio@openbsd.org>
@@ -337,7 +337,7 @@ peer_flush_upcall(struct rib_entry *re, void *arg)
if (rib == NULL)
continue;
rp = prefix_get(rib, peer, p->path_id,
- &addr, prefixlen);
+ &addr, prefixlen);
if (rp) {
asp = prefix_aspath(rp);
if (asp && asp->pftableid)
diff --git a/usr.sbin/bgpd/rde_rib.c b/usr.sbin/bgpd/rde_rib.c
index d07171010d2..578d3aca700 100644
--- a/usr.sbin/bgpd/rde_rib.c
+++ b/usr.sbin/bgpd/rde_rib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde_rib.c,v 1.241 2022/07/25 16:37:55 claudio Exp $ */
+/* $OpenBSD: rde_rib.c,v 1.242 2022/07/28 13:11:51 deraadt Exp $ */
/*
* Copyright (c) 2003, 2004 Claudio Jeker <claudio@openbsd.org>
@@ -850,9 +850,9 @@ static int prefix_move(struct prefix *, struct rde_peer *,
struct nexthop *, uint8_t, uint8_t);
static void prefix_link(struct prefix *, struct rib_entry *,
- struct pt_entry *, struct rde_peer *, uint32_t, uint32_t,
- struct rde_aspath *, struct rde_community *,
- struct nexthop *, uint8_t, uint8_t);
+ struct pt_entry *, struct rde_peer *, uint32_t, uint32_t,
+ struct rde_aspath *, struct rde_community *,
+ struct nexthop *, uint8_t, uint8_t);
static void prefix_unlink(struct prefix *);
static struct prefix *prefix_alloc(void);
diff --git a/usr.sbin/bgpd/rde_sets.c b/usr.sbin/bgpd/rde_sets.c
index 3aa0f770444..766f38d3ade 100644
--- a/usr.sbin/bgpd/rde_sets.c
+++ b/usr.sbin/bgpd/rde_sets.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde_sets.c,v 1.11 2022/02/06 09:51:19 claudio Exp $ */
+/* $OpenBSD: rde_sets.c,v 1.12 2022/07/28 13:11:51 deraadt Exp $ */
/*
* Copyright (c) 2018 Claudio Jeker <claudio@openbsd.org>
@@ -158,7 +158,7 @@ set_add(struct set_table *set, void *elms, size_t nelms)
return -1;
}
for (new_size = set->max; new_size < set->nmemb + nelms; )
- new_size += (new_size < 4096 ? new_size : 4096);
+ new_size += (new_size < 4096 ? new_size : 4096);
s = reallocarray(set->set, new_size, set->size);
if (s == NULL)
diff --git a/usr.sbin/bgpd/session.c b/usr.sbin/bgpd/session.c
index d07bb3a4ece..f80b6f79b14 100644
--- a/usr.sbin/bgpd/session.c
+++ b/usr.sbin/bgpd/session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: session.c,v 1.431 2022/07/18 13:56:41 claudio Exp $ */
+/* $OpenBSD: session.c,v 1.432 2022/07/28 13:11:51 deraadt Exp $ */
/*
* Copyright (c) 2003, 2004, 2005 Henning Brauer <henning@openbsd.org>
@@ -288,7 +288,7 @@ session_main(int debug, int verbose)
if (peer_cnt > peer_l_elms) {
if ((newp = reallocarray(peer_l, peer_cnt,
sizeof(struct peer *))) == NULL) {
- /* panic for now */
+ /* panic for now */
log_warn("could not resize peer_l from %u -> %u"
" entries", peer_l_elms, peer_cnt);
fatalx("exiting");
@@ -313,7 +313,7 @@ session_main(int debug, int verbose)
if (mrt_cnt > mrt_l_elms) {
if ((newp = reallocarray(mrt_l, mrt_cnt,
sizeof(struct mrt *))) == NULL) {
- /* panic for now */
+ /* panic for now */
log_warn("could not resize mrt_l from %u -> %u"
" entries", mrt_l_elms, mrt_cnt);
fatalx("exiting");
@@ -327,7 +327,7 @@ session_main(int debug, int verbose)
if (new_cnt > pfd_elms) {
if ((newp = reallocarray(pfd, new_cnt,
sizeof(struct pollfd))) == NULL) {
- /* panic for now */
+ /* panic for now */
log_warn("could not resize pfd from %u -> %u"
" entries", pfd_elms, new_cnt);
fatalx("exiting");
@@ -1442,7 +1442,7 @@ session_open(struct peer *p)
/* BGP open policy, RFC 9234 */
if (p->capa.ann.role_ena) {
errs += session_capa_add(opb, CAPA_ROLE, 1);
- errs += ibuf_add(opb, &p->capa.ann.role, 1);
+ errs += ibuf_add(opb, &p->capa.ann.role, 1);
}
/* graceful restart and End-of-RIB marker, RFC 4724 */
@@ -2174,7 +2174,7 @@ bad_len:
extlen = 1;
}
- /* RFC9020 encoding has 3 extra bytes */
+ /* RFC9020 encoding has 3 extra bytes */
if (optparamlen + 3 * extlen != msglen - MSGSIZE_OPEN_MIN)
goto bad_len;
}
@@ -2524,14 +2524,14 @@ parse_notification(struct peer *peer)
reason_len = *p++;
datalen--;
if (datalen < reason_len) {
- log_peer_warnx(&peer->conf,
- "received truncated shutdown reason");
- return (0);
+ log_peer_warnx(&peer->conf,
+ "received truncated shutdown reason");
+ return (0);
}
if (reason_len > REASON_LEN - 1) {
- log_peer_warnx(&peer->conf,
- "received overly long shutdown reason");
- return (0);
+ log_peer_warnx(&peer->conf,
+ "received overly long shutdown reason");
+ return (0);
}
memcpy(peer->stats.last_reason, p, reason_len);
peer->stats.last_reason[reason_len] = '\0';
diff --git a/usr.sbin/bgpd/session.h b/usr.sbin/bgpd/session.h
index 696cf2aa4db..68573f287ea 100644
--- a/usr.sbin/bgpd/session.h
+++ b/usr.sbin/bgpd/session.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: session.h,v 1.156 2022/06/27 13:26:51 claudio Exp $ */
+/* $OpenBSD: session.h,v 1.157 2022/07/28 13:11:51 deraadt Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -289,9 +289,9 @@ void log_conn_attempt(const struct peer *, struct sockaddr *,
/* mrt.c */
void mrt_dump_bgp_msg(struct mrt *, void *, uint16_t,
- struct peer *, enum msg_type);
+ struct peer *, enum msg_type);
void mrt_dump_state(struct mrt *, uint16_t, uint16_t,
- struct peer *);
+ struct peer *);
void mrt_done(struct mrt *);
/* pfkey.c */