summaryrefslogtreecommitdiff
path: root/usr.sbin/relayd
AgeCommit message (Collapse)Author
2009-09-30Bring in sync with the bgpd version of carp.c. This fixes a memory leakClaudio Jeker
in an error path.
2009-09-30carp_demote_ioctl() can handle more then +/-1 steps so there is no need toClaudio Jeker
loop in the shutdown case. OK henning@ Fix an error message to include the correct function name.
2009-09-15Enclose repeated buffer draining code in a new msgbuf_drain()Jacek Masiulaniec
function, which is additionally exported for use by others. It will be needed by smtpd's SSL module when the SMTP client code is changed to replace libevent's evbuffers with our msgbuf_* API. ok gilles@ henning@ guenther@ eric@
2009-09-01sync with new pfReyk Floeter
ok henning@
2009-08-27lookup(n.) -> look up(v.)Jason McIntyre
2009-08-27allow to specify interface names as addresses, for example "listen onReyk Floeter
em0". the implementation will lookup the first IPv4 address of an interface before any other IPv4 and IPv6 addresses. ok gilles@ (i got inspired by smtpd)
2009-08-17also report routers and their host states in relayctlReyk Floeter
ok pyr@, jmc@ for man bits
2009-08-14do not timeout disabled hosts in the icmp checksReyk Floeter
Thanks to Sebastian Benoit, closes pr6146
2009-08-13add new 'router' functionality to dynamically add or remove routesReyk Floeter
based on health check results, using the existing table syntax. this allows to maintain multiple (uplink) gateways to implement link balancing or WAN link failover if no routing protocol or other keepalive method is available. works fine with or without net.inet.ip.multipath enabled. ok pyr@, jmc@ for manpages
2009-08-08Make imsg_clear close and free any fds in the received fd queue as well asNicholas Marriott
freeing the msgbuf. While here also remove an unnecessary while loop. ok eric pyr
2009-08-07get the default ttl via sysctl instead of using IPDEFTTLReyk Floeter
2009-08-07rename 'struct session' to 'struct rsession' because it conflicts withReyk Floeter
another 'struct session' in sys/sysctl.h.
2009-08-07allow to modify the IP TTL value for host checks. this can be used toReyk Floeter
check if the host is only n hops away and not re-routed over a longer path.
2009-08-07add missing lineReyk Floeter
2009-08-07allow to specify host attributes in an arbitrary order (parent, retry) byReyk Floeter
making the grammar a bit more flexible.
2009-08-07cosmetic change - move address into an own elementReyk Floeter
2009-08-05prevent configuration of relays listening to a single addr:port tuple twiceReyk Floeter
2009-08-05support multiple 'listen on' lines in a single relay blockReyk Floeter
2009-08-05tables don't need pf if running in "l7" relay modeReyk Floeter
2009-07-23make buf_write() behave like msgbuf_write(): send out only theEric Faurot
bytes that were filled, not the whole buffer. ok pyr@ gilles@
2009-06-09missing header file; bring things into scopeTheo de Raadt
2009-06-08revert this change by eric@:David Gwynne
Make the imsg protocol network-safe. it might be network safe, but half the imsg based daemons on my firewalls dont run anymore.
2009-06-07Change the way fds passed over a socket are retreived on the receiving side.Eric Faurot
Currently the receiver fetches an imsg via imsg_get() and if he expects an fd, he then calls imsg_get_fd() to fetch the next fd queued on the imsgbuf from which the imsg came. This changes hides the fd queueing mechanism to the API user. When closing an imsg with an fd, the message is flagged so that the receiving end knows it must dequeue the fd in imsg_get() and return it with the imsg structure. This way there is no (less) possible screw up from imsg_get_fd() not being called directly after imsg_get() by the user. The retreived imsg is self-contained. ok pyr@, "I like that" henning@
2009-06-07Make the imsg protocol network-safe.Eric Faurot
ok pyr@
2009-06-06change the imsg header fields a bit to prepare for upcoming changes.Eric Faurot
add a flag field, use u_int32_t for pid_t and extend type to 32 bits for padding. ok pyr@
2009-06-06Get ready for including imsg.h from a lib, when it comes along.Pierre-Yves Ritschard
2009-06-06allocate the correct amount of memoryEric Faurot
ok pyr@
2009-06-06remove unnecessary and scary pid check in imsg_init.Pierre-Yves Ritschard
ok eric@, claudio@
2009-06-05didn't we just say we remove libevent from the imsg framework?Eric Faurot
ok pyr@
2009-06-054 handed diff with eric:Pierre-Yves Ritschard
Stop pushing event handling in the imsg framework. Instead, provide a small glue layer on top of both imsg and libevent. This finally clearly separates event handling and imsg construction. Sidetrack bonus: remove the mega-ugly hack of having a dummy imsg_event_add stub in relayctl. This will make bgpd (and thus henning) happy. Next up are smtpd and ospfd. ok eric@
2009-06-05bring buf_write here as well.Pierre-Yves Ritschard
2009-06-05Add an unused data field, to allow smtpd and ypldap to work, all libPierre-Yves Ritschard
ready daemons have NULL diffs now for the imsg files. This field should eventually die a honorable death as it was a design screwup.
2009-06-05bump MAX_IMSGSIZE here as wellPierre-Yves Ritschard
2009-06-05sync buffer.c with ospfd, send out buf->wpos and not buf->size.Pierre-Yves Ritschard
2009-06-05some KNF cleanup following the last sed.Pierre-Yves Ritschard
2009-06-05Make imsg completely async model agnostic by not requiring anPierre-Yves Ritschard
imsg_event_add function to be provided (which ended up being a named callback). Instead provide a wrapper in the daemon and call that everywhere. Previsously discussed with the usual suspects, ok eric@ though not too happy about the function name (imsg_compose_event).
2009-06-04move logging functions out of imsg.h, make imsg.c more library readyPierre-Yves Ritschard
by not calling log_* or fatal and handle set errno when appropriate. discussed with a bunch of imsg conscious guys, ok eric@
2009-06-04change imsg_close() return type to void. It never fails nor does itEric Faurot
return any useful value. "ok now" pyr@
2009-06-04- move message types enum back to relayd.hEric Faurot
- use u_int16_t instead of enum imsg_type in imsg function prototypes requested by reyk@, ok pyr@
2009-06-04revert previous commit for now since it won't play well with snmpd.Eric Faurot
ok pyr@
2009-06-04make the imsg framework endian-safe so that it can also be usedEric Faurot
for network message passing. ok pyr@
2009-06-04remove unused variableReyk Floeter
2009-06-04tweakReyk Floeter
2009-06-04Keep around the SSL session for each checked host. This way SSLReyk Floeter
caching can kick in on subsequent checks, making them faster and lighter on the server. From camield, closes PR 6137 (modified diff)
2009-06-04Make imsg.c and buffer.c more generic by introducingEric Faurot
imsg.h and a daemon-specific imsg_types.h discussed with and "yes, please" pyr@
2009-06-03cleanup contorted and slightly broken call to imsg_get_fdEric Faurot
ok pyr@
2009-06-03initialize queueEric Faurot
ok pyr@
2009-06-03change buf_close return type to void.Eric Faurot
that function is not supposed to report anything remotely useful, or fail in any meaningful way. ok pyr@
2009-06-02bring in buf_seek, buf_size and buf_left from bgpdEric Faurot
ok pyr@
2009-06-02constify argument to buf_addEric Faurot
ok pyr@