summaryrefslogtreecommitdiff
path: root/usr.sbin/hostapd/parse.y
AgeCommit message (Collapse)Author
2019-05-10Delete superfluous #includes of <ifaddrs.h>, <net/if_dl.h>, and <net/if_enc.h>Philip Guenther
ok krw@, jsg@
2019-02-13(unsigned) means (unsigned int) which on ptrdiff_t or size_t or otherTheo de Raadt
larger types really is a range reduction... Almost any cast to (unsigned) is a bug. ok millert tb benno
2018-11-01- odd condition/test in PF lexerAlexandr Nedvedicky
(and other lexers too) This commit rectifies earlier change: in the lex... even inside quotes, a \ followed by space or tab should 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). OK deraadt@, OK millert@
2018-07-11Do for most running out of memory err() what was done for most runningKenneth R Westerback
out of memory log_warn(). i.e. ("%s", __func__) instead of manual function names and redundant verbiage about which wrapper detected the out of memory condition. ok henning@
2018-07-09No need to mention which memory allocation entry point failed (malloc,Kenneth R Westerback
calloc or strdup), we just need to log that we ran out of memory in a particular function. Recommended by florian@ and deraadt@ ok benno@ henning@ tb@
2018-06-11Fix an off-by-one line count when using include statements.denis
Thanks to otto@ for the initial diff. OK benno@
2018-04-26Plug leak in error case of the common 'varset' implementations.Kenneth R Westerback
ok benno@
2018-02-13Normalize handle limit timeval in microsecond (usec) case.cheloha
Makes stuff like limit 1500000 usec work correctly. ok millert@ tb@
2017-01-05Replace hand-rolled for(;;) emptying of 'symhead' TAILQ with moreKenneth R Westerback
modern TAILQ_FOREACH_SAFE(). No intentional functional change. ok millert@ bluhm@ gilles@
2017-01-05Replace symset()'s hand-rolled for(;;) traversal of 'symhead' TAILQKenneth R Westerback
with more modern TAILQ_FOREACH(). This what symget() was already doing. Add paranoia '{}' around body of symget()'s TAILQ_FOREACH(). No intentional functional change. ok bluhm@ otto@
2016-06-21do not allow whitespace in macro names, i.e. "this is" = "a variable".Sebastian Benoit
change this in all config parsers in our tree that support macros. problem reported by sven falempin. feedback from henning@, stsp@, deraadt@ ok florian@ mikeb@
2015-08-20stdlib.h is in scope; do not cast malloc/calloc/realloc*Theo de Raadt
ok millert krw
2015-01-16Replace <sys/param.h> with <limits.h> and other less dirty headers whereTheo de Raadt
possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)
2014-11-20Don't allow embedded nul characters in strings.Jonathan Gray
Fixes a pfctl crash with an anchor name containing an embedded nul found with the afl fuzzer. pfctl parse.y patch from and ok deraadt@
2014-11-14Add gcc printf format attributes to yyerror() in parse.y files.Doug Hogan
No yyerror() calls needed to be changed. ok bluhm@
2014-11-03Convert the logic in yyerror(). Instead of creating a temporaryAlexander Bluhm
format string, create a temporary message. OK benno@ doug@
2014-01-22relax the cfg file secrecy check slightly to allow group readabilityHenning Brauer
default permissions and mtree NOT changed. prodded by benno, ok phessler benno jmatthew theo pelikan florian
2013-11-25use u_char for buffers in yylex, for ctype callsSebastian Benoit
found by millert@, ok 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-01-11lex <=, >=, !=, and -> into a single token for correctness and to reduce theTheo de Raadt
lookahead in the parser ok reyk
2009-03-31Fixed memory leaks which would occur if the second of two memoryTobias Stoeckmann
allocations fails. looks right deraadt, krw ok henning
2009-02-15no need for __packed, and it is even used wrong; from raggeTheo de Raadt
2008-10-17bring in the findeol() fix from pfctl. list of affected parsers by sthenHenning Brauer
2008-02-27Unbreak parser by initializing topfile correctly.Marco Pfatschbacher
I got fooled by patch(1). Sorry.
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-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-22last one left behind.Pierre-Yves Ritschard
all daemons synced. ok reyk@
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-12Add NUMBER support for signed and unsigned 64bit numbers to the lexerReyk Floeter
instead of passing numbers as STRINGs. Add careful range checks whenever NUMBERs are used in the grammar. From deraadt@ (except the specific range checks)
2007-02-09unbreak the symset functionReyk Floeter
2007-02-08carefully check some return values and make lint happy. check forReyk Floeter
truncation before feeding strings into the kernel.
2006-12-31add a channel hopper for wireless interfaces. the channel hopper willReyk Floeter
jump to the next available channel after a configurable delay for the specified list of wireless "hostap" interfaces, see the new "set hostap hopper" commands in hostapd.conf(5). with help by jsg@
2006-10-13check error condition of strtonumReyk Floeter
2006-09-28fix the configuration parser for event rules: correct handling ofReyk Floeter
multiple matches of the 'not' grammar rule and correct 'lladdr' address matching. figured out by Stephen Lewis (stephen at sock dot org dot uk), thanks!
2006-06-27add new event rules to match optional elements of radiotap headers:Reyk Floeter
signal percentage, transmit rate and channel frequency. ok and hints by jsg@ jmc@
2006-06-01don't use the newline character in hostapd_log() callsReyk Floeter
2006-05-26\<char> is <char> except for \<newline> -- no exceptions. much like howTheo de Raadt
other things work. ok henning
2006-05-15initial implementation of "IP Roaming" in hostapd, see hostapd.conf(5).Reyk Floeter
ok dlg@
2005-12-29add an 'include' rule to hostapd.conf(5); based on an older diff fromReyk Floeter
dhartmei@ for the parser. this is useful if you have many hostapd systems using the same configuration but individual local definitions (like macros or table entries).
2005-12-18Update my e-mail address in the copyright statement, no binary changes.Reyk Floeter
2005-12-10add an option to increase the multicast ttl which is currently limitedReyk Floeter
to 1 hop. by using a higher multicast ttl, you could use inter-network multicast forwarding of hostapd messages (i.e. with mrouted(8) or multicast-capable routing switches); "set iapp mode multicast ttl 2".
2005-12-01add configuration option to enable/disable specified iapp subtype handlingReyk Floeter
2005-12-01support netmasks in table entry ip address assignmentsReyk Floeter
2005-12-01move iapp configuration in a separate data structureReyk Floeter
2005-11-23add optional interface rule for event rulesReyk Floeter
2005-11-20add support for multiple hostap (wireless) interfaces.Reyk Floeter
for example, if you run one hostapd with two ath(4) devices. you have to specify "set hostap interface { ath0, ath1 }" in hostapd.conf(5). man page bits by jmc@, tested by others
2005-11-16add a configuration option for specifying a non-standard port and multicastReyk Floeter
address for the IAPP messages. this is an initial approach to run multiple hostapds on one machine, further work will be done later.