summaryrefslogtreecommitdiff
path: root/usr.sbin/relayd
AgeCommit message (Collapse)Author
2010-05-26Move imsg into libutil and add a man page.Nicholas Marriott
Minor bump for libutil. Previous versions of this diff and man page looked at by various people. "you should just commit" deraadt
2010-05-26Rename some imsg bits to make namespace collisions less likely buf toNicholas Marriott
ibuf, buf_read to ibuf_read, READ_BUF_SIZE to IBUF_READ_SIZE. ok henning gilles claudio jacekm deraadt
2010-05-24now that we can handle >9 args, put "-D name=value" on one line: it's a bitJason McIntyre
more readable, and fixes a spacing bug we had in smtpd.8;
2010-05-18use the right capitalization for "HyperText Transfer Protocol (HTTP)"Igor Sobrado
and "server". fixes for bgplg(8) and relayd.conf(5) suggested by jmc@, good catch! ok jmc@
2010-05-14allocate all struct event's on the heap, it looks cleaner, feels betterReyk Floeter
and follows a suggestion in event.h. also don't mix signal() and signal_set()/signal_add(). ok jsg@ gilles@
2010-05-14zero out the allocate memory for a new control connection via calloc()Reyk Floeter
ok jsg@ gilles@
2010-05-14spacingReyk Floeter
2010-05-10Various comment typos. 'wether' -> 'whether' (most popular), 'possiblity' ->Kenneth R Westerback
'possibility', 'optins' -> 'options', 'resposne' -> 'response', 'unecessary' -> 'unnecessary', 'desination' -> 'destination'. Collected from various misc@ and tech@ postings, many by Brad Tilley.
2010-04-27imsg.h does not need sys/tree.h.Nicholas Marriott
ok eric
2010-04-07Remove XXX comment and just close received fd if calloc() fails.Nicholas Marriott
If this happens the imsg may no longer be usable as there may be queued messages, but this is a) already the case with the code now, and b) would be the case if recvmsg() fails anyway, so we can document that -1 from imsg_read() invalidates the struct imsgbuf. discussed with and ok eric
2010-03-24DSR got broken with the move towards the new pf.Pierre-Yves Ritschard
This fixes it. Found out by Laurent Lavaud & myself. "looks olrite" henning@
2010-02-24Sync the list of initialisation steps done for the defaultJonathan Gray
relay protocol with that done for specified relay protocols. Makes it possible to use SSL for the default relay protocol. From boudewijn@indes.com in pr 6316
2010-02-23Fix .Oo .Xo .Oc .Xc mis-nesting by just dropping the .Xo and .Xc which,Ingo Schwarze
in these cases, is useless anyway. Found by and fixing the build with mandoc; still fine with both old and new groff. ok jmc@
2010-02-18Fix a leak that could happen with multiple requests on the oneJonathan Gray
connection and while here create a seperate function for handling cleaning up after a request; with suggestions from reyk and claudio. ok claudio@
2010-02-18Do an event_del before event_set/event_add in case we double addJonathan Gray
something here as well. ok claudio@ phessler@
2010-02-17Always call the shutdown code after returning from event_dispatch().Jonathan Gray
As the child processes now call event_loopexit() and signal handling is done through libevent if a child process died we wouldn't always cleanup properly and wouldn't do carp demote to failover either. This matches the way ospfd does things which is where the event_loopexit() in child processes change came from originally. ok claudio@ pyr@
2010-02-04In event_again() call event_del() before calling event_set() so weJonathan Gray
don't get into a situation where we are calling event_set() on an event that was already added. ok claudio@
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@