summaryrefslogtreecommitdiff
path: root/usr.sbin/rtadvd
AgeCommit message (Collapse)Author
2018-03-19two fixes from klemens nanni, plus one tweak from myself;Jason McIntyre
ok sthen
2017-12-08Convert snprintf+write into dprintf. It is simply easier to read, andTheo de Raadt
provides retry on short-write file descriptors. ok florian, previous versions seen by millert
2017-09-14clarify that slaacd is a client; Xr to rtadvd. feedback/ok benno jmcStuart Henderson
2017-08-22Rename now oddly-named variable.Jeremie Courreges-Anglas
2017-08-13The impossibility has been impossible since an impossible longFlorian Obser
time. And indeed it is impossible to arrive here with something other than a ND_OPT_PREFIX_INFORMATION. Remove #if 0'ed block.
2017-08-12No need to constantly re-open a socket. Just open it up front and keepFlorian Obser
it around. OK jca
2017-08-10No need to handle multiple routing messages here.Jeremie Courreges-Anglas
route(4) sockets only ever ship a single routing message per read(2) call, so simplify this. Mostly mechanical diff for now, some further cleanups will follow. ok rob@ florian@
2017-08-08Do not forget to reschedule the timer when we receive a new prefix.Jeremie Courreges-Anglas
This way the new prefix can be advertized asap. ok florian@
2017-07-12errno is not set, use log_warnxFlorian Obser
OK benno
2017-07-12replaceFlorian Obser
log_warnx("foo"); exit(1); with fatalx("foo); OK benno
2017-07-12Bring over fatal{,x} from bgpd so that we can have format strings.Florian Obser
OK benno
2017-07-12Don't clobber errno, we want to log_warn what went wrong.Florian Obser
OK benno, millert
2017-06-09If we receive a router solicitation with a source link-layer addressFlorian Obser
option respond with a unicast advertisement. This improves air time on wireless networks and reduces energy consumption on battery powered devices. For details see RFC 7772 "Reducing Energy Consumption of Router Advertisements" aka BCP 202. Input & OK bluhm@
2017-04-05Unify variables used for recvmsg/sendmsgJeremie Courreges-Anglas
ok millert@ deraadt@
2017-04-05sendmsg returns a signed value, fix error checkJeremie Courreges-Anglas
ok millert@ deraadt@
2017-04-05Don't rely on asprintf setting pointer to NULL on failure.Jeremie Courreges-Anglas
ok millert@ deraadt@ tom@
2017-04-02Always use return value of asprintf to determine success/failure,Theo de Raadt
don't rely upon *ret becoming NULL ok millert, tom
2017-03-21From a syslog perspective it does not make sense to log fatal andAlexander Bluhm
warn with the same severity. Switch log_warn() to LOG_ERR and keep fatal() at LOG_CRIT. OK reyk@ florian@
2017-01-20work on making log.c similar in all daemons:Sebastian Benoit
reduce the (mostly whitespace) differences so that log.c's can be diffed easily. need to set verbose in main() when option -d is used. ok florian@
2016-09-26Exit early from rdaemon() is the passed fd is invalid.Jeremie Courreges-Anglas
fd == -1 check suggested by deraadt@, ok florian@
2016-09-25consistently use MAX_ prefixFlorian Obser
OK jca
2016-09-25Interval calculations are perfectly fine with ints.Florian Obser
OK jca@
2016-09-21Use a properly aligned buffer (malloc'd, not on stack) to get routing messages.Jeremie Courreges-Anglas
This fixes rtadvd on (at least) armv7. Problem reported and fix tested by Martin Brandenburg.
2016-09-21Use the correct local variable to get address & prefixlen in routing messagesJeremie Courreges-Anglas
This currently has no effect because route sockets are datagram (PR_ATOMIC) sockets, so we only get one message at a time. This means that the parsing code could be simplified. route(4) sockets cluebat from claudio@
2016-09-15Go in the background later, using rdaemon().Jeremie Courreges-Anglas
rdaemon() works like daemon(3) but requires its caller to pre-open /dev/null. This makes it possible to go in the background after a chroot(2), allowing for more error checking. The pattern is basically - open /dev/null - chroot - privdrop - rdaemon "design" initialy discussed with semarie@ a while ago, ok dlg@
2016-09-03typosJeremie Courreges-Anglas
2016-08-25Fix rtadvd.conf(5) example for pinfoflags, it accepts numbers not strings.Stuart Henderson
ok phessler
2016-08-20Tweak timer debug output.Jeremie Courreges-Anglas
-RA timer on em0 is set to 16:0 +RA timer on em0 is set to 16.0s
2016-08-20Move counters from u_quad_t to uint64_t.Jeremie Courreges-Anglas
Printing is already done with %llu/(unsigned long long) casts.
2016-08-02Move to libevent; ok florian@Jeremie Courreges-Anglas
2016-06-30Prevent NULL deref, pointed out by llvm's scan-build.Florian Obser
OK jca, millert
2016-06-29Spring cleanupJeremie Courreges-Anglas
- pointless casts, kill caddr_t or replace it with char * - signed counters - simplify if_getmtu, only one method is needed and SIOCGIFMTU is the cheapest - we no longer have drivers for IFT_FDDI - hide details of iflist management - if (dflag) log_debug -> log_debug - dead code and comments - etc etc Input from and ok florian@
2016-05-07Replace .Po/.Pc with .Pq, and drop extra .Li; suggested by jmc@Jeremie Courreges-Anglas
2016-05-07Document that both raflags and rtflags can hold route preference flags.Jeremie Courreges-Anglas
Input from an ok jmc@
2016-03-01fatal("malloc") -> fatal(NULL)Jeremie Courreges-Anglas
2016-03-01Pointless 'return;' in void functionsJeremie Courreges-Anglas
2016-03-01Kill unused #definesJeremie Courreges-Anglas
No functional change
2016-02-29Merge add/make_prefix() and kill last use of struct in6_prefixreq in userland.Jeremie Courreges-Anglas
ok florian@
2016-02-29init_prefix() is now trivial, merge it with its caller.Jeremie Courreges-Anglas
Suggested by and ok bluhm@
2016-02-26sys/signal.h -> signal.hJeremie Courreges-Anglas
2016-02-26Unused variable.Jeremie Courreges-Anglas
2016-02-26GC remnants of the Router Renumbering code; ok florian@Jeremie Courreges-Anglas
2016-02-26Remove #if'0ed code that uses a deprecated ioctl; ok florian@Jeremie Courreges-Anglas
2016-02-26Kill some useless members of struct rainfo; ok florian@Jeremie Courreges-Anglas
2016-02-09another typoJeremie Courreges-Anglas
2016-02-09Kill code to send unicast packets which never got enabled.Jeremie Courreges-Anglas
and get rid of pointless memory allocations. ok bluhm@
2016-02-08Kill trailing whitespace.Jeremie Courreges-Anglas
2016-02-08typosJeremie Courreges-Anglas
2016-02-08Print MAX addresses padded with a leading zero.Jeremie Courreges-Anglas
2016-02-07Mark a few others functions as __dead; ok bluhm@Jeremie Courreges-Anglas