summaryrefslogtreecommitdiff
path: root/usr.sbin/relayd
AgeCommit message (Collapse)Author
2010-11-16Add support for enable/disable table when using relays instead of redirects.Jonathan Gray
From Patrik Lundin and Linus Widstromer. ok reyk@
2010-10-26no need for .Pp before lists;Jason McIntyre
2010-10-26redirects are loaded as "pass in quick ... rdr-to" pf rules by default. InReyk Floeter
some cases it is desired to load the rules as "match in" without "quick" to allow additional filtering or applying additional rule/state options, eg. to add an overload table for DOS mitigation. Add the optional "match" keyword for the redirect "tag" option to change the pf rule type accordingly. ok jsg@ mikeb@
2010-10-18Missing semicolon, ok henning@Stuart Henderson
2010-10-12Plug a significant memory leak when using SSL.David Hill
ok claudio@, jsg@, phessler@
2010-09-02remove trailing spaces and tabs from source code; no binary changesIgor Sobrado
(verified by both sthen@ and me). ok sthen@; "just commit it" claudio@
2010-08-26stray spaces, no binary changeMarco Peereboom
2010-08-07Fix carp demotion on tables. For some reason the default values wereClaudio Jeker
inherited from the table definition even though these values could not be changed there. While there fix a memory leak in a rather strange case. OK phessler, jsg, pyr, sthen, deraadt
2010-08-03fix linecount bug with comments spanning multiple linesHenning Brauer
problem reported with the obvious fix for bgpd by Sebastian Benoit <benoit-lists at fb12.de>, also PR 6432 applied to all the others by yours truly. ok theo isn't it amazing how far this parser (and more) spread?
2010-08-01Allow fallback tables for relays, not just redirections.Stuart Henderson
Seems reasonable to jsg, ok phessler, no response from reyk or pyr
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.