summaryrefslogtreecommitdiffstats
path: root/usr.sbin/route6d
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2003-08-17 16:26:35 +0000
committerume <ume@FreeBSD.org>2003-08-17 16:26:35 +0000
commit5b1d87bdd2e3076921c2640650d0c808ee7ec179 (patch)
treee803663795eef4ed90c28b6366b64064dd0b2ed5 /usr.sbin/route6d
parent99b1b224da3bbe545ff4eef3c4665170a0fa06e4 (diff)
downloadFreeBSD-src-5b1d87bdd2e3076921c2640650d0c808ee7ec179.zip
FreeBSD-src-5b1d87bdd2e3076921c2640650d0c808ee7ec179.tar.gz
knf, typo, space.
Obtained from: KAME MFC after: 1 week
Diffstat (limited to 'usr.sbin/route6d')
-rw-r--r--usr.sbin/route6d/route6d.c28
-rw-r--r--usr.sbin/route6d/route6d.h6
2 files changed, 13 insertions, 21 deletions
diff --git a/usr.sbin/route6d/route6d.c b/usr.sbin/route6d/route6d.c
index 769799c..696a9bc 100644
--- a/usr.sbin/route6d/route6d.c
+++ b/usr.sbin/route6d/route6d.c
@@ -990,8 +990,8 @@ sendpacket(sin6, len)
sincopy = *sin6;
sin6 = &sincopy;
- if (IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr)
- || IN6_IS_ADDR_MULTICAST(&sin6->sin6_addr)) {
+ if (IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr) ||
+ IN6_IS_ADDR_MULTICAST(&sin6->sin6_addr)) {
idx = IN6_LINKLOCAL_IFINDEX(sin6->sin6_addr);
SET_IN6_LINKLOCAL_IFINDEX(sin6->sin6_addr, 0);
} else
@@ -1089,7 +1089,7 @@ riprecv()
rp = (struct rip6 *)buf;
np = rp->rip6_nets;
- if (rp->rip6_vers != RIP6_VERSION) {
+ if (rp->rip6_vers != RIP6_VERSION) {
trace(1, "Incorrect RIP version %d\n", rp->rip6_vers);
return;
}
@@ -2069,7 +2069,7 @@ ifrt(ifcp, again)
/*
* there are couple of p2p interface routing models. "behavior" lets
* you pick one. it looks that gated behavior fits best with BSDs,
- * since BSD kernels does not look at prefix length on p2p interfaces.
+ * since BSD kernels do not look at prefix length on p2p interfaces.
*/
void
ifrt_p2p(ifcp, again)
@@ -2559,11 +2559,7 @@ rt_entry(rtm, again)
rrt->rrt_t = time(NULL);
if (aflag == 0 && (rtm->rtm_flags & RTF_STATIC))
rrt->rrt_t = 0; /* Don't age static routes */
-#if 0
- np->rip6_tag = htons(routetag & 0xffff);
-#else
np->rip6_tag = 0;
-#endif
np->rip6_metric = rtm->rtm_rmx.rmx_hopcount;
if (np->rip6_metric < 1)
np->rip6_metric = 1;
@@ -2707,16 +2703,16 @@ addroute(rrt, gw, ifcp)
if (errno == EEXIST) {
trace(0, "ADD: Route already exists %s/%d gw %s\n",
- inet6_n2p(&np->rip6_dest), np->rip6_plen, buf1);
+ inet6_n2p(&np->rip6_dest), np->rip6_plen, buf1);
if (rtlog)
fprintf(rtlog, "ADD: Route already exists %s/%d gw %s\n",
- inet6_n2p(&np->rip6_dest), np->rip6_plen, buf1);
+ inet6_n2p(&np->rip6_dest), np->rip6_plen, buf1);
} else {
trace(0, "Can not write to rtsock (addroute): %s\n",
- strerror(errno));
+ strerror(errno));
if (rtlog)
fprintf(rtlog, "\tCan not write to rtsock: %s\n",
- strerror(errno));
+ strerror(errno));
}
return -1;
}
@@ -2774,16 +2770,16 @@ delroute(np, gw)
if (errno == ESRCH) {
trace(0, "RTDEL: Route does not exist: %s/%d gw %s\n",
- inet6_n2p(&np->rip6_dest), np->rip6_plen, buf2);
+ inet6_n2p(&np->rip6_dest), np->rip6_plen, buf2);
if (rtlog)
fprintf(rtlog, "RTDEL: Route does not exist: %s/%d gw %s\n",
- inet6_n2p(&np->rip6_dest), np->rip6_plen, buf2);
+ inet6_n2p(&np->rip6_dest), np->rip6_plen, buf2);
} else {
trace(0, "Can not write to rtsock (delroute): %s\n",
- strerror(errno));
+ strerror(errno));
if (rtlog)
fprintf(rtlog, "\tCan not write to rtsock: %s\n",
- strerror(errno));
+ strerror(errno));
}
return -1;
}
diff --git a/usr.sbin/route6d/route6d.h b/usr.sbin/route6d/route6d.h
index 5c59d6a..a52a971 100644
--- a/usr.sbin/route6d/route6d.h
+++ b/usr.sbin/route6d/route6d.h
@@ -30,10 +30,6 @@
* SUCH DAMAGE.
*/
-/* not yet in use
-#define ROUTE6D_CONF "/usr/local/v6/etc/route6d.conf"
-*/
-
#define ROUTE6D_DUMP "/var/run/route6d_dump"
#define ROUTE6D_PID "/var/run/route6d.pid"
@@ -45,7 +41,7 @@
#define IFC_CHANGED 1
struct netinfo6 {
- struct in6_addr rip6_dest;
+ struct in6_addr rip6_dest;
u_short rip6_tag;
u_char rip6_plen;
u_char rip6_metric;
OpenPOWER on IntegriCloud