summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sbin/route/route.c8
-rw-r--r--sys/net/rtsock.c44
2 files changed, 26 insertions, 26 deletions
diff --git a/sbin/route/route.c b/sbin/route/route.c
index 47e009a1201..3a82c0414c0 100644
--- a/sbin/route/route.c
+++ b/sbin/route/route.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: route.c,v 1.195 2017/01/19 23:18:29 phessler Exp $ */
+/* $OpenBSD: route.c,v 1.196 2017/01/23 00:10:07 krw Exp $ */
/* $NetBSD: route.c,v 1.16 1996/04/15 18:27:05 cgd Exp $ */
/*
@@ -239,7 +239,7 @@ main(int argc, char **argv)
exit(flushroutes(argc, argv));
break;
}
-
+
if (pledge("stdio rpath dns", NULL) == -1)
err(1, "pledge");
@@ -1309,7 +1309,7 @@ print_rtmsg(struct rt_msghdr *rtm, int msglen)
else
printf("[rtm_type %d out of range]", rtm->rtm_type);
- printf(": len %d", rtm->rtm_msglen);
+ printf(": len %d", rtm->rtm_msglen);
switch (rtm->rtm_type) {
case RTM_DESYNC:
printf("\n");
@@ -1632,7 +1632,7 @@ bfd_calc_uptime(time_t time)
tp = localtime(&time);
(void)strftime(buf, sizeof(buf), fmt, tp);
- return (buf);
+ return (buf);
}
void
diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c
index 158f3c06b80..0ece3802ae8 100644
--- a/sys/net/rtsock.c
+++ b/sys/net/rtsock.c
@@ -1,10 +1,10 @@
-/* $OpenBSD: rtsock.c,v 1.216 2017/01/22 04:31:02 claudio Exp $ */
+/* $OpenBSD: rtsock.c,v 1.217 2017/01/23 00:10:07 krw Exp $ */
/* $NetBSD: rtsock.c,v 1.18 1996/03/29 00:32:10 cgd Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@@ -16,7 +16,7 @@
* 3. Neither the name of the project nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -131,12 +131,12 @@ struct route_cb {
struct route_cb route_cb;
/*
- * These flags and timeout are used for indicating to userland (via a
- * RTM_DESYNC msg) when the route socket has overflowed and messages
+ * These flags and timeout are used for indicating to userland (via a
+ * RTM_DESYNC msg) when the route socket has overflowed and messages
* have been lost.
*/
#define ROUTECB_FLAG_DESYNC 0x1 /* Route socket out of memory */
-#define ROUTECB_FLAG_FLUSH 0x2 /* Wait until socket is empty before
+#define ROUTECB_FLAG_FLUSH 0x2 /* Wait until socket is empty before
queueing more packets */
#define ROUTE_DESYNC_RESEND_TIMEOUT (hz / 5) /* In hz */
@@ -201,11 +201,11 @@ route_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *nam,
rop = (struct routecb *)rp;
/*
- * If we are in a FLUSH state, check if the buffer is
+ * If we are in a FLUSH state, check if the buffer is
* empty so that we can clear the flag.
*/
if (((rop->flags & ROUTECB_FLAG_FLUSH) != 0) &&
- ((sbspace(&rp->rcb_socket->so_rcv) ==
+ ((sbspace(&rp->rcb_socket->so_rcv) ==
rp->rcb_socket->so_rcv.sb_hiwat)))
rop->flags &= ~ROUTECB_FLAG_FLUSH;
break;
@@ -277,12 +277,12 @@ route_ctloutput(int op, struct socket *so, int level, int optname,
case PRCO_GETOPT:
switch (optname) {
case ROUTE_MSGFILTER:
- *mp = m = m_get(M_WAIT, MT_SOOPTS);
+ *mp = m = m_get(M_WAIT, MT_SOOPTS);
m->m_len = sizeof(unsigned int);
*mtod(m, unsigned int *) = rop->msgfilter;
break;
case ROUTE_TABLEFILTER:
- *mp = m = m_get(M_WAIT, MT_SOOPTS);
+ *mp = m = m_get(M_WAIT, MT_SOOPTS);
m->m_len = sizeof(unsigned int);
*mtod(m, unsigned int *) = rop->rtableid;
break;
@@ -310,13 +310,13 @@ rt_senddesync(void *data)
return;
/*
- * If we fail to alloc memory or if sbappendaddr()
+ * If we fail to alloc memory or if sbappendaddr()
* fails, re-add timeout and try again.
*/
desync_mbuf = rt_msg1(RTM_DESYNC, NULL);
if (desync_mbuf != NULL) {
s = splsoftnet();
- if (sbappendaddr(&rp->rcb_socket->so_rcv, &route_src,
+ if (sbappendaddr(&rp->rcb_socket->so_rcv, &route_src,
desync_mbuf, NULL) != 0) {
rop->flags &= ~ROUTECB_FLAG_DESYNC;
sorwakeup(rp->rcb_socket);
@@ -340,7 +340,7 @@ route_input(struct mbuf *m0, sa_family_t sa_family)
int s, sockets = 0;
struct socket *last = NULL;
struct sockaddr *sosrc, *sodst;
-
+
sosrc = &route_src;
sodst = &route_dst;
@@ -409,7 +409,7 @@ route_input(struct mbuf *m0, sa_family_t sa_family)
}
/*
- * Check to see if the flush flag is set. If so, don't queue
+ * Check to see if the flush flag is set. If so, don't queue
* any more messages until the flag is cleared.
*/
if ((rop->flags & ROUTECB_FLAG_FLUSH) != 0)
@@ -423,11 +423,11 @@ route_input(struct mbuf *m0, sa_family_t sa_family)
sbappendaddr(&last->so_rcv, sosrc,
n, (struct mbuf *)NULL) == 0) {
/*
- * Flag socket as desync'ed and
+ * Flag socket as desync'ed and
* flush required
*/
- sotoroutecb(last)->flags |=
- ROUTECB_FLAG_DESYNC |
+ sotoroutecb(last)->flags |=
+ ROUTECB_FLAG_DESYNC |
ROUTECB_FLAG_FLUSH;
rt_senddesync((void *) sotorawcb(last));
m_freem(n);
@@ -446,7 +446,7 @@ route_input(struct mbuf *m0, sa_family_t sa_family)
sbappendaddr(&last->so_rcv, sosrc,
m, (struct mbuf *)NULL) == 0) {
/* Flag socket as desync'ed and flush required */
- sotoroutecb(last)->flags |=
+ sotoroutecb(last)->flags |=
ROUTECB_FLAG_DESYNC | ROUTECB_FLAG_FLUSH;
rt_senddesync((void *) sotorawcb(last));
m_freem(m);
@@ -769,8 +769,8 @@ report:
*/
if ((rt != NULL) && ISSET(rt->rt_flags, RTF_MPATH) &&
(info.rti_info[RTAX_GATEWAY] == NULL)) {
- rtfree(rt);
- rt = NULL;
+ rtfree(rt);
+ rt = NULL;
}
#endif
/*
@@ -939,7 +939,7 @@ flush:
if (rtm) {
if (error)
rtm->rtm_errno = error;
- else {
+ else {
rtm->rtm_flags |= RTF_DONE;
}
}
@@ -1542,7 +1542,7 @@ sysctl_rtable(int *name, u_int namelen, void *where, size_t *given, void *new,
size_t newlen)
{
int i, error = EINVAL;
- u_char af;
+ u_char af;
struct walkarg w;
struct rt_tableinfo tableinfo;
u_int tableid = 0;