summaryrefslogtreecommitdiff
path: root/usr.sbin/ifstated
AgeCommit message (Collapse)Author
2008-05-12Error out with usage line if additional arguments are given after thePierre-Yves Ritschard
option parsing. Found out the hard way by jdixon on ifstated. ok sobrado@, jdixon@, millert@
2008-03-10Fix a null deref in link_state, which happens on configMarco Pfatschbacher
files which refer to undeclared states. popfile() needs to be called later. Found by and OK cnst@
2008-02-26Have popfile() also close the main config file,Marco Pfatschbacher
but only do the final popfile call after yyparse() is done. This also fixes config reload on SIGHUP for some daemons. Spotted by otto@. OK deraadt@
2007-11-27remove some unneeded #includes; ok mcbride@Kevin Steves
2007-11-12Remove space/tab compression function from lgetc() and replaceMarco Pfatschbacher
it with a simple filter in the yylex() loop. The compression in lgetc() didn't happen for quoted strings, thus creating a regression when tabs were used in variables. Some testing by todd@ and pyr@ OK deraadt@
2007-10-25kill extraneous item macro, thus avoiding badness;Jason McIntyre
2007-10-25oops, forgot to clean up the manpage bits.Pierre-Yves Ritschard
prompted by mpf
2007-10-25sync logging with most other daemons.Pierre-Yves Ritschard
ok mcbride@, mpf@
2007-10-21sync with other daemons.Pierre-Yves Ritschard
ok mcbride@
2007-10-16Allow '=' to end a number in all lexers.Marco Pfatschbacher
Requested and OK deraadt@
2007-10-16in the lex... even inside quotes, a \ followed by space or tab shouldTheo de Raadt
expand to space or tab, and a \ followed by newline should be ignored (as a line continuation). compatible with the needs of hoststated (which has the most strict quoted string requirements), and ifstated (where one commonly does line continuations in strings). pointed out by mpf, discussed with pyr
2007-10-13in all these programs using the same pfctl-derived parse.y, re-unify theTheo de Raadt
yylex implementation and the code which interacts with yylex. this also brings the future potential for include support to all of the parsers. in the future please do not silly modifications to one of these files without checking if you are de-unifying the code. checked by developers in all these areas.
2007-10-11next step in the yylex unification: handle quoted strings in a nicer fashionTheo de Raadt
as found in hoststated, and make all the code diff as clean as possible. a few issues remain mostly surrounding include support, which will likely be added to more of the grammers soon. ok norby pyr, others
2007-09-12unchecked conversion from signed 64 to unsigned 32Theo de Raadt
2007-09-11extend lex to spot numbers in the stream, without impacting the parsingTheo de Raadt
of ip addresses and such. this change is being pushed into all the pfctl derived parsers, starting with the easier ones; range check written by mpf; ok mpf
2007-05-31convert to new .Dd format;Jason McIntyre
2007-02-09remove some commas to aid readability; ok jmc@Kevin Steves
2006-11-28handle the new link states as UPReyk Floeter
2006-11-26repair missing DPADD requestsTheo de Raadt
2006-10-25strtonum, Pierre-Yves Ritschard <pyr@spootnik.org>Henning Brauer
2006-10-25same old debug cruft from bgpd as killed in ospfd and dvrmpd - is it yetHenning Brauer
somewhere else?
2006-09-04somehow i managed not to commit the macro changes here...Jason McIntyre
2006-07-25amazing how far a typo of mine (CFLAGS vs CLFAGS) from early 2004 spreadHenning Brauer
(and how long it went unnoticed) From: Alexey Dobriyan <adobriyan@gmail.com>
2006-05-26\<char> is <char> except for \<newline> -- no exceptions. much like howTheo de Raadt
other things work. ok henning
2006-03-16Make ifstated handle config reloads after a parse error. Fixes PR5051Ryan Thomas McBride
Fix from Michael Knudsen.
2006-03-16Error out of ifstate.conf parsing instead of dumping core in operationRyan Thomas McBride
when a undefined ruleset is referenced. Fixes PR5049. Report and troubleshooting from Michael Knudsen.
2006-03-16Kill useless arguments to libevent *_set() functions.Ryan Thomas McBride
ok mpf@
2006-02-08- configuration file can have relative pathCamiel Dobbelaar
- do not suppress logging if there is no configuration yet, otherwise we cannot log that configuration parsing failed ok mpf@ mcbride@
2006-02-01Simplify expression code. Patch from markus@.Marco Pfatschbacher
ok mcbride@
2006-02-01Run external tests synchronous at state changes andMarco Pfatschbacher
call adjust_external_expressions() which updates the expressions for all states. Address similar state caching problems for external tests as in previous commit. Don't ignore set-state actions if they are happening right after a state change. (Based on a patch from Holger Mikolon). ok markus@, testing sturm@, ok mcbride@.
2006-02-01If we reenter a state, it still has the old link state values cached.Marco Pfatschbacher
Therefore, if it enters a state without calling scan_ifstate() (e.g. through an external-test) ifstated will do the wrong thing (tm). Change scan_ifstate() to first walk over all states and update the expressions _before_ they are evaluated. Help and ok markus@, testing sturm@, ok mcbride@.
2006-01-25Remove gratuitous fetch_state() calls in state_change().Marco Pfatschbacher
It could race with a second incoming routing message, which would not trigger any action, because of the already updated status cache. Found by markus@. OK markus@ mcbride@
2006-01-23Open the routing socket before load_config() calls fetch_state().Marco Pfatschbacher
Otherwise we could loose routing messages that arrive in between. OK markus@, mcbride@
2006-01-20Explicitly include limits.h if we are going to use its contents.Todd C. Miller
2005-09-09missing quote in an example;Jason McIntyre
from xavier venient; while i'm in here, remove a blank line that serves no purpose;
2005-08-09same hereMarco Pfatschbacher
3.8 not 3.5
2005-08-09ifstated isn't released before 3.8Marco Pfatschbacher
ok jmc@
2005-08-06add ifstated.conf(5) to SEE ALSO;Jason McIntyre
2005-08-06new manpage for ifstated.conf written with mpf@Nikolay Sturm
comments and help from jmc@, commitski henning@
2005-08-03use action_block in init instead of custom code, permits single lineNikolay Sturm
commands w/o braces in init ok henning, mpf
2005-07-28no need for libutil.Marco Pfatschbacher
OK markus@
2005-07-28Fix two situations where ifstated was leaking zombies.Marco Pfatschbacher
Tested by sturm@ OK henning@
2005-02-07Fix error message: set-state, not setstate.Ryan Thomas McBride
2005-02-07Fix protos, and a KNF nit. From Andrey Matveev <andrushock@korovino.net>Ryan Thomas McBride
2005-02-03Simplify the ifstated syntax:Marco Pfatschbacher
"carp0 link up" => carp0.link.up "and" => && "or" => || * Allow one line actions after if statements without braces. * Remove unecessary parentheses in the example config. ok mcbride@
2004-12-14use YFLAGS=Marco Pfatschbacher
ok mcbride@
2004-10-05Use priority instead of facility in vsyslog()Marco Pfatschbacher
Pointed out by Peter Philipp. ok mcbride@
2004-09-27mention how SIGHUP is handled.Jared Yanovich
from Michael Knudsen. ok mcbride
2004-09-21Start external tests and init commands also in the initial state.Marco Pfatschbacher
Log the pid when killing an external program. Avoid a possible NULL dereference. ok mcbride@
2004-06-15knfTheo de Raadt