summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2004-05-08 19:17:21 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2004-05-08 19:17:21 +0000
commit3287273117ca2657bfbd79538b58e9d07dd6ab06 (patch)
tree301c5d0d897996fa46c6c8a3279afa856a9e3e0f
parente46173b87c1cf20aeda23d81858846c03c73b752 (diff)
KNF
-rw-r--r--usr.sbin/bgpd/log.c5
-rw-r--r--usr.sbin/bgpd/parse.y11
-rw-r--r--usr.sbin/bgpd/pftable.c6
-rw-r--r--usr.sbin/bgpd/printconf.c16
-rw-r--r--usr.sbin/bgpd/rde.c6
-rw-r--r--usr.sbin/bgpd/rde_rib.c4
6 files changed, 27 insertions, 21 deletions
diff --git a/usr.sbin/bgpd/log.c b/usr.sbin/bgpd/log.c
index 096868191e9..2c05f877b16 100644
--- a/usr.sbin/bgpd/log.c
+++ b/usr.sbin/bgpd/log.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: log.c,v 1.35 2004/05/08 18:21:55 henning Exp $ */
+/* $OpenBSD: log.c,v 1.36 2004/05/08 19:17:20 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -405,7 +405,8 @@ log_sockaddr(struct sockaddr *sa)
{
static char buf[NI_MAXHOST];
- if (getnameinfo(sa, sa->sa_len, buf, sizeof(buf), NULL, 0, NI_NUMERICHOST))
+ if (getnameinfo(sa, sa->sa_len, buf, sizeof(buf), NULL, 0,
+ NI_NUMERICHOST))
return ("(unknown)");
else
return (buf);
diff --git a/usr.sbin/bgpd/parse.y b/usr.sbin/bgpd/parse.y
index 53ad8f02fc5..9c35b1588cb 100644
--- a/usr.sbin/bgpd/parse.y
+++ b/usr.sbin/bgpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.106 2004/05/08 19:09:34 henning Exp $ */
+/* $OpenBSD: parse.y,v 1.107 2004/05/08 19:17:20 henning Exp $ */
/*
* Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -579,14 +579,17 @@ peeropts : REMOTEAS asnumber {
}
if ($2)
- curpeer->conf.auth.method = AUTH_IPSEC_MANUAL_ESP;
+ curpeer->conf.auth.method =
+ AUTH_IPSEC_MANUAL_ESP;
else {
if ($8.enc_alg) {
- yyerror("\"ipsec ah\" doesn't take encryption keys");
+ yyerror("\"ipsec ah\" doesn't take "
+ "encryption keys");
free($7);
YYERROR;
}
- curpeer->conf.auth.method = AUTH_IPSEC_MANUAL_AH;
+ curpeer->conf.auth.method =
+ AUTH_IPSEC_MANUAL_AH;
}
if ($3 == 1) {
diff --git a/usr.sbin/bgpd/pftable.c b/usr.sbin/bgpd/pftable.c
index 52c28033229..0f53c67531d 100644
--- a/usr.sbin/bgpd/pftable.c
+++ b/usr.sbin/bgpd/pftable.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pftable.c,v 1.1 2004/05/07 10:06:15 djm Exp $ */
+/* $OpenBSD: pftable.c,v 1.2 2004/05/08 19:17:20 henning Exp $ */
/*
* Copyright (c) 2004 Damien Miller <djm@openbsd.org>
@@ -54,7 +54,7 @@ LIST_HEAD(, pf_table) tables = LIST_HEAD_INITIALIZER(tables);
static int
pftable_change(struct pf_table *pft)
{
- struct pfioc_table tio;
+ struct pfioc_table tio;
int ret;
if (pft->naddrs == 0 || pft->what == 0)
@@ -170,7 +170,7 @@ pftable_clear_all(void)
}
static int
-pftable_add_work(const char *table, struct bgpd_addr *addr,
+pftable_add_work(const char *table, struct bgpd_addr *addr,
u_int8_t len, int del)
{
struct pf_table *pft;
diff --git a/usr.sbin/bgpd/printconf.c b/usr.sbin/bgpd/printconf.c
index 1d38bc463cf..dbe220be40b 100644
--- a/usr.sbin/bgpd/printconf.c
+++ b/usr.sbin/bgpd/printconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: printconf.c,v 1.19 2004/05/08 18:23:24 henning Exp $ */
+/* $OpenBSD: printconf.c,v 1.20 2004/05/08 19:17:20 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -115,7 +115,8 @@ print_mainconf(struct bgpd_config *conf)
bzero(&ina6, sizeof(ina6));
if (bcmp(&ina6, &conf->listen6_addr.sin6_addr, sizeof(ina6)))
- printf("listen on %s\n", log_sockaddr((struct sockaddr *)&conf->listen6_addr));
+ printf("listen on %s\n",
+ log_sockaddr((struct sockaddr *)&conf->listen6_addr));
}
void
@@ -177,20 +178,21 @@ print_peer(struct peer_config *p)
if (p->auth.method == AUTH_MD5SIG)
printf("%s\ttcp md5sig\n", c);
- else if (p->auth.method == AUTH_IPSEC_MANUAL_ESP || p->auth.method == AUTH_IPSEC_MANUAL_AH) {
+ else if (p->auth.method == AUTH_IPSEC_MANUAL_ESP ||
+ p->auth.method == AUTH_IPSEC_MANUAL_AH) {
if (p->auth.method == AUTH_IPSEC_MANUAL_ESP)
method = "esp";
else
method = "ah";
- printf("%s\tipsec %s in spi %u %s XXXXXX", c, method, p->auth.spi_in,
- print_auth_alg(p->auth.auth_alg_in));
+ printf("%s\tipsec %s in spi %u %s XXXXXX", c, method,
+ p->auth.spi_in, print_auth_alg(p->auth.auth_alg_in));
if (p->auth.enc_alg_in)
printf(" %s XXXXXX", print_enc_alg(p->auth.enc_alg_in));
printf("\n");
- printf("%s\tipsec %s out spi %u %s XXXXXX", c, method, p->auth.spi_out,
- print_auth_alg(p->auth.auth_alg_out));
+ printf("%s\tipsec %s out spi %u %s XXXXXX", c, method,
+ p->auth.spi_out, print_auth_alg(p->auth.auth_alg_out));
if (p->auth.enc_alg_out)
printf(" %s XXXXXX",
print_enc_alg(p->auth.enc_alg_out));
diff --git a/usr.sbin/bgpd/rde.c b/usr.sbin/bgpd/rde.c
index 5976049f20f..9a6f4441701 100644
--- a/usr.sbin/bgpd/rde.c
+++ b/usr.sbin/bgpd/rde.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde.c,v 1.111 2004/05/07 10:06:15 djm Exp $ */
+/* $OpenBSD: rde.c,v 1.112 2004/05/08 19:17:20 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -801,7 +801,7 @@ rde_send_kroute(struct prefix *new, struct prefix *old)
* pf table specific functions
*/
void
-rde_send_pftable(const char *table, struct bgpd_addr *addr,
+rde_send_pftable(const char *table, struct bgpd_addr *addr,
u_int8_t len, int del)
{
struct pftable_msg pfm;
@@ -815,7 +815,7 @@ rde_send_pftable(const char *table, struct bgpd_addr *addr,
pfm.len = len;
if (imsg_compose(&ibuf_main,
- del ? IMSG_PFTABLE_REMOVE : IMSG_PFTABLE_ADD,
+ del ? IMSG_PFTABLE_REMOVE : IMSG_PFTABLE_ADD,
0, &pfm, sizeof(pfm)) == -1)
fatal("imsg_compose error");
}
diff --git a/usr.sbin/bgpd/rde_rib.c b/usr.sbin/bgpd/rde_rib.c
index 1e8de56591a..a069b2af72f 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.45 2004/05/07 10:06:15 djm Exp $ */
+/* $OpenBSD: rde_rib.c,v 1.46 2004/05/08 19:17:20 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Claudio Jeker <claudio@openbsd.org>
@@ -440,7 +440,7 @@ prefix_remove(struct rde_peer *peer, struct bgpd_addr *prefix, int prefixlen)
rde_send_pftable(asp->flags.pftable, prefix, prefixlen, 1);
rde_send_pftable_commit();
-
+
prefix_unlink(p);
prefix_free(p);