aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/rtadvd/rtadvd.c
diff options
context:
space:
mode:
authorHajimu UMEMOTO <ume@FreeBSD.org>2003-08-08 16:56:01 +0000
committerHajimu UMEMOTO <ume@FreeBSD.org>2003-08-08 16:56:01 +0000
commitfa19f9be0400bf0b77b89ad6940eb0675235db1c (patch)
tree178f6af642cf6aacbd3415e4286f66d0b9bd3bba /usr.sbin/rtadvd/rtadvd.c
parent5ed8c16b882bf0cd10fa24e3dd8aacbe1b60d8bb (diff)
downloadsrc-fa19f9be0400bf0b77b89ad6940eb0675235db1c.tar.gz
src-fa19f9be0400bf0b77b89ad6940eb0675235db1c.zip
KNF, correct typos and cleanup spaces.
Obtained from: KAME MFC after: 1 week
Notes
Notes: svn path=/head/; revision=118664
Diffstat (limited to 'usr.sbin/rtadvd/rtadvd.c')
-rw-r--r--usr.sbin/rtadvd/rtadvd.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/usr.sbin/rtadvd/rtadvd.c b/usr.sbin/rtadvd/rtadvd.c
index dffcab6dd577..96739620ec0a 100644
--- a/usr.sbin/rtadvd/rtadvd.c
+++ b/usr.sbin/rtadvd/rtadvd.c
@@ -530,14 +530,14 @@ rtmsg_input()
}
/* check if an interface flag is changed */
- if ((oldifflags & IFF_UP) != 0 && /* UP to DOWN */
- (iflist[ifindex]->ifm_flags & IFF_UP) == 0) {
+ if ((oldifflags & IFF_UP) && /* UP to DOWN */
+ !(iflist[ifindex]->ifm_flags & IFF_UP)) {
syslog(LOG_INFO,
"<%s> interface %s becomes down. stop timer.",
__func__, rai->ifname);
rtadvd_remove_timer(&rai->timer);
- } else if ((oldifflags & IFF_UP) == 0 && /* DOWN to UP */
- (iflist[ifindex]->ifm_flags & IFF_UP) != 0) {
+ } else if (!(oldifflags & IFF_UP) && /* DOWN to UP */
+ (iflist[ifindex]->ifm_flags & IFF_UP)) {
syslog(LOG_INFO,
"<%s> interface %s becomes up. restart timer.",
__func__, rai->ifname);
@@ -760,7 +760,7 @@ rs_input(int len, struct nd_router_solicit *rs,
memset(&ndopts, 0, sizeof(ndopts));
if (nd6_options((struct nd_opt_hdr *)(rs + 1),
len - sizeof(struct nd_router_solicit),
- &ndopts, NDOPT_FLAG_SRCLINKADDR)) {
+ &ndopts, NDOPT_FLAG_SRCLINKADDR)) {
syslog(LOG_DEBUG,
"<%s> ND option check failed for an RS from %s on %s",
__func__,
@@ -1092,7 +1092,7 @@ prefix_check(struct nd_opt_prefix_info *pinfo,
if (rai->clockskew &&
abs(preferred_time - pp->pltimeexpire) > rai->clockskew) {
syslog(LOG_INFO,
- "<%s> prefeerred lifetime for %s/%d"
+ "<%s> preferred lifetime for %s/%d"
" (decr. in real time) inconsistent on %s:"
" %d from %s, %ld from us",
__func__,
@@ -1107,7 +1107,7 @@ prefix_check(struct nd_opt_prefix_info *pinfo,
}
} else if (preferred_time != pp->preflifetime) {
syslog(LOG_INFO,
- "<%s> prefeerred lifetime for %s/%d"
+ "<%s> preferred lifetime for %s/%d"
" inconsistent on %s:"
" %d from %s, %d from us",
__func__,
@@ -1227,16 +1227,14 @@ nd6_options(struct nd_opt_hdr *hdr, int limit,
}
if (hdr->nd_opt_type > ND_OPT_MTU) {
- syslog(LOG_INFO,
- "<%s> unknown ND option(type %d)",
+ syslog(LOG_INFO, "<%s> unknown ND option(type %d)",
__func__, hdr->nd_opt_type);
continue;
}
if ((ndopt_flags[hdr->nd_opt_type] & optflags) == 0) {
- syslog(LOG_INFO,
- "<%s> unexpected ND option(type %d)",
- __func__, hdr->nd_opt_type);
+ syslog(LOG_INFO, "<%s> unexpected ND option(type %d)",
+ __func__, hdr->nd_opt_type);
continue;
}