aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSUZUKI Shinsuke <suz@FreeBSD.org>2003-04-22 09:40:57 +0000
committerSUZUKI Shinsuke <suz@FreeBSD.org>2003-04-22 09:40:57 +0000
commita6f227a8128f3db12ad51dfc1115cc2c91955faf (patch)
tree8247d76ea9c44cedf21e5759f62166eff846dfa5
parent4ed8fdd9b55bc6dd1f3071c5e9765982883cb9b9 (diff)
downloadsrc-a6f227a8128f3db12ad51dfc1115cc2c91955faf.tar.gz
src-a6f227a8128f3db12ad51dfc1115cc2c91955faf.zip
MFC rev 1.15
- fixed byte order of route lifetimes in route info options. - corrected wording in a log message. Obtained from: KAME
Notes
Notes: svn path=/releng/5.0/; revision=113847
-rw-r--r--usr.sbin/rtadvd/config.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/rtadvd/config.c b/usr.sbin/rtadvd/config.c
index 5b7d3041d2c8..e7d92a132e71 100644
--- a/usr.sbin/rtadvd/config.c
+++ b/usr.sbin/rtadvd/config.c
@@ -478,7 +478,7 @@ getconfig(intface)
MAYHAVE(val, entbuf, 0);
rti->rtpref = val & ND_RA_FLAG_RTPREF_MASK;
if (rti->rtpref == ND_RA_FLAG_RTPREF_RSV) {
- syslog(LOG_ERR, "<%s> invalid router preference",
+ syslog(LOG_ERR, "<%s> invalid route preference",
__FUNCTION__);
exit(1);
}
@@ -1055,7 +1055,7 @@ make_packet(struct rainfo *rainfo)
ndopt_rti->nd_opt_rti_len = 1 + psize;
ndopt_rti->nd_opt_rti_prefixlen = rti->prefixlen;
ndopt_rti->nd_opt_rti_flags = 0xff & rti->rtpref;
- ndopt_rti->nd_opt_rti_lifetime = rti->ltime;
+ ndopt_rti->nd_opt_rti_lifetime = htonl(rti->ltime);
memcpy(ndopt_rti + 1, &rti->prefix, psize * 8);
buf += sizeof(struct nd_opt_route_info) + psize * 8;
}