summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/ifstated/ifstated.c15
-rw-r--r--usr.sbin/ifstated/ifstated.h4
2 files changed, 8 insertions, 11 deletions
diff --git a/usr.sbin/ifstated/ifstated.c b/usr.sbin/ifstated/ifstated.c
index b71791b915f..1e0267a49a1 100644
--- a/usr.sbin/ifstated/ifstated.c
+++ b/usr.sbin/ifstated/ifstated.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ifstated.c,v 1.44 2017/06/28 10:38:16 benno Exp $ */
+/* $OpenBSD: ifstated.c,v 1.45 2017/06/28 11:10:08 benno Exp $ */
/*
* Copyright (c) 2004 Marco Pfatschbacher <mpf@openbsd.org>
@@ -72,7 +72,8 @@ void eval_state(struct ifsd_state *);
int state_change(void);
void do_action(struct ifsd_action *);
void remove_action(struct ifsd_action *, struct ifsd_state *);
-void remove_expression(struct ifsd_expression *, struct ifsd_state *);
+void remove_expression(struct ifsd_expression *,
+ struct ifsd_state *);
__dead void
usage(void)
@@ -151,12 +152,12 @@ main(int argc, char *argv[])
rtfilter = ROUTE_FILTER(RTM_IFINFO);
if (setsockopt(rt_fd, PF_ROUTE, ROUTE_MSGFILTER,
- &rtfilter, sizeof(rtfilter)) == -1) /* not fatal */
+ &rtfilter, sizeof(rtfilter)) == -1) /* not fatal */
log_warn("%s: setsockopt msgfilter", __func__);
rtfilter = RTABLE_ANY;
if (setsockopt(rt_fd, PF_ROUTE, ROUTE_TABLEFILTER,
- &rtfilter, sizeof(rtfilter)) == -1) /* not fatal */
+ &rtfilter, sizeof(rtfilter)) == -1) /* not fatal */
log_warn("%s: setsockopt tablefilter", __func__);
signal_set(&sigchld_ev, SIGCHLD, sigchld_handler, NULL);
@@ -180,7 +181,7 @@ startup_handler(int fd, short event, void *arg)
log_warnx("unable to load config");
exit(1);
}
-
+
event_set(&rt_msg_ev, rfd, EV_READ|EV_PERSIST, rt_msg_handler, NULL);
event_add(&rt_msg_ev, NULL);
@@ -605,7 +606,7 @@ fetch_state(void)
for (ifa = ifap; ifa; ifa = ifa->ifa_next) {
struct ifreq ifr;
- struct if_data ifrdat;
+ struct if_data ifrdat;
if (oname && !strcmp(oname, ifa->ifa_name))
continue;
@@ -624,8 +625,6 @@ fetch_state(void)
close(sock);
}
-
-
/*
* Clear the config.
*/
diff --git a/usr.sbin/ifstated/ifstated.h b/usr.sbin/ifstated/ifstated.h
index 6807c793b61..16173cca761 100644
--- a/usr.sbin/ifstated/ifstated.h
+++ b/usr.sbin/ifstated/ifstated.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ifstated.h,v 1.11 2017/06/18 12:03:47 benno Exp $ */
+/* $OpenBSD: ifstated.h,v 1.12 2017/06/28 11:10:08 benno Exp $ */
/*
* Copyright (c) 2004 Ryan McBride
@@ -29,7 +29,6 @@
#include <sys/types.h>
#include <sys/queue.h>
-
struct ifsd_expression;
TAILQ_HEAD(ifsd_expression_list, ifsd_expression);
@@ -81,7 +80,6 @@ struct ifsd_action {
#define IFSD_ACTION_CONDITION 3
};
-
struct ifsd_expression {
TAILQ_ENTRY(ifsd_expression) entries;
TAILQ_ENTRY(ifsd_expression) eval;