summaryrefslogtreecommitdiff
path: root/usr.sbin/relayd
AgeCommit message (Collapse)Author
2010-01-12when generating rdr rules, ensure the nat address is PF_ADDR_NONE to avoidDavid Gwynne
confusing pf.
2010-01-12First pass at removing the 'pf_pool' mechanism for translation and routingRyan Thomas McBride
actions. Allow interfaces to be specified in special table entries for the routing actions. Lists of addresses can now only be done using tables, which pfctl will generate automatically from the existing syntax. Functionally, this deprecates the use of multiple tables or dynamic interfaces in a single nat or rdr rule. ok henning dlg claudio
2010-01-11add "log brief" and "log verbose" to change logging verbosityJonathan Gray
like several other things in the tree. ok reyk@ looks fine claudio@
2009-12-02log_warn() consistency.Michael Knudsen
`OK' claudio
2009-11-23Unbreak tree, rs_num is now type and while there use PF_TRANS_RULESET insteadClaudio Jeker
of the hardcoded 0. OK henning@
2009-11-22styleTobias Stoeckmann
ok jmc
2009-11-11don't leak memory in an error case.Jonathan Gray
found by parfait.
2009-11-03reorder structure elements for struct netroute & router: static configReyk Floeter
elements first (this matches all the other structures). no functional change.
2009-10-22write UNIX-domain in a more consistent way; while here, replace aIgor Sobrado
few remaining ".Tn UNIX" macros with ".Ux" ones. pointed out by ratchov@, thanks! ok jmc@
2009-10-22use the UNIX-related macros (.At and .Ux) where appropriate.Igor Sobrado
ok jmc@
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@