summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ospf6d/parse.y (follow)
Commit message (Collapse)AuthorAgeFilesLines
* getifaddrs() can return entries where ifa_addr is NULL. Check for thisbenno2020-12-291-2/+3
| | | | | before accessing anything in ifa_addr. ok claudio@
* Allow the interface setting "type p2p" to be configured globallz or perremi2020-01-211-5/+8
| | | | | | area. Most of the other interface settings allow this. ok denis@
* Add point-to-point support for broadcast interfaces.remi2019-12-261-2/+7
| | | | | tested by Kapetanakis Giannis ok denis@
* Area is now part of struct ifacedenis2019-12-231-2/+2
| | | | OK remi@
* Rework route priority filter.denis2019-12-161-2/+6
| | | | reads OK benno@ remi@
* Introduce conf_clear_redist_list() (from ospfd) and use it in all 3 procs.remi2019-06-111-1/+13
| | | | ok benno@
* Allow specifying area by number as well as id. No changes to outputs.remi2019-05-261-10/+22
| | | | | reads OK to kn@ OK denis@
* Check that depend on interfaces are in the same rdomain. If they are notremi2019-04-291-5/+28
| | | | | | the daemon wouldn't notice state changes for those interfaces. ok benno@
* (unsigned) means (unsigned int) which on ptrdiff_t or size_t or otherderaadt2019-02-131-3/+3
| | | | | | larger types really is a range reduction... Almost any cast to (unsigned) is a bug. ok millert tb benno
* Add config option fib-priority to set a custom prio for routes ospf6dremi2018-12-291-3/+13
| | | | | | inserts into the kernel routing table. OK denis@
* - odd condition/test in PF lexersashan2018-11-011-2/+3
| | | | | | | | | | | | | | (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@
* replace malloc()+strlcpy() with strndup() in cmdline_symset().miko2018-09-071-9/+4
| | | | "looks good" gilles@ halex@
* Add support for rdomains.remi2018-07-121-2/+33
| | | | | small quirk from tb@ ok phessler@
* With the "depend on" option routes are sent out with a metric of 65535 ifremi2018-07-121-4/+46
| | | | | | | the referenced interface is down or in state backup. This is especially useful on a carp cluster to ensure all traffic goes to the carp master. ok friehm@ jca@
* remove wrong commentremi2018-07-111-2/+1
| | | | ok jca@ tb@
* Do for most running out of memory err() what was done for most runningkrw2018-07-111-5/+5
| | | | | | | | 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@
* No need to mention which memory allocation entry point failed (malloc,krw2018-07-091-5/+5
| | | | | | | | | 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@
* Be consistent in warn() and log_warn() usage whenkrw2018-07-081-3/+3
| | | | | | | | running out of memory. Next step, be correct *and* consistent. ok dennis@ tb@ benno@ schwarze@
* Fix an off-by-one line count when using include statements.denis2018-06-111-49/+82
| | | | | | Thanks to otto@ for the initial diff. OK benno@, remi@
* Plug leak in error case of the common 'varset' implementations.krw2018-04-261-1/+3
| | | | ok benno@
* Replace hand-rolled for(;;) emptying of 'symhead' TAILQ with morekrw2017-01-051-3/+2
| | | | | | | | modern TAILQ_FOREACH_SAFE(). No intentional functional change. ok millert@ bluhm@ gilles@
* Replace symset()'s hand-rolled for(;;) traversal of 'symhead' TAILQkrw2017-01-051-5/+7
| | | | | | | | | | | 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@
* do not allow whitespace in macro names, i.e. "this is" = "a variable".benno2016-06-211-1/+9
| | | | | | | | 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@
* Don't allow embedded nul characters in strings.jsg2014-11-201-1/+4
| | | | | | | 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@
* Convert the logic in yyerror(). Instead of creating a temporarybluhm2014-11-031-6/+6
| | | | | format string, create a temporary message. OK deraadt@ claudio@
* Add gcc format attributes to parse.y for ospf{6,}d.doug2014-11-021-4/+8
| | | | | | Fix a few yyerror() lines that are missing arguments. ok claudio@ sthen@
* relax the cfg file secrecy check slightly to allow group readabilityhenning2014-01-221-3/+3
| | | | | default permissions and mtree NOT changed. prodded by benno, ok phessler benno jmatthew theo pelikan florian
* use u_char for buffers in yylex, for ctype callsbenno2013-11-251-7/+7
| | | | found by millert@, ok deraadt@
* sync yyerror() with version in bgpd so that it logs to syslog when daemonized.sthen2013-03-061-5/+8
| | | | ok florian@
* bring include support for config files in from ospfd.dlg2011-06-271-1/+19
| | | | sure deraadt@
* Do not use a carp address as ospf router id because it is not unique.bluhm2010-12-131-1/+3
| | | | ok claudio@
* Redistributing the default route with ospf6d did not work correctly.bluhm2010-08-221-52/+47
| | | | | | | | | - kroute.c may not ignore the default route. - Use the ROUNDUP macro from route/show.c as this one is also correct for netmask with prefixlen 0. - Implement ospf_redistribute and the redistribute parser like ospfd. ok claudio@
* fix linecount bug with comments spanning multiple lineshenning2010-08-031-3/+4
| | | | | | | 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?
* Fix all white space bugs in ospf6d at once. No binary change.bluhm2010-07-011-2/+2
| | | | ok claudio@
* Fixed memory leaks which would occur if the second of two memorytobias2009-03-311-3/+7
| | | | | | | allocations fails. looks right deraadt, krw ok henning
* Same fix as just committed to ospfd:stsp2009-01-261-2/+2
| | | | | | | First convert IP addresses to host-byte-order before checking which one is smaller. Additionally fix the check to find the lowest configured IP as suggested by the RFC. ok claudio@
* bring in the findeol() fix from pfctl. list of affected parsers by sthenhenning2008-10-171-3/+5
|
* Have popfile() also close the main config file,mpf2008-02-261-14/+15
| | | | | | | 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@
* Monster commit of stuff I did mostly last month. What it does:claudio2007-12-131-32/+6
| | | | | | | | | | | * removes kif and uses iface for everything interface related. This removes unneeded data redundancy which makes the code more complex. * adds the link local prefix to struct iface and attaches a list with the other prefixes to the struct iface. This is needed to generate the link LSA. * disconnects struct iface from struct area (the backpointer is gone) this will make the reload code a bit easier. norby@ agrees with the direction we're heading with this
* Remove space/tab compression function from lgetc() and replacempf2007-11-121-10/+2
| | | | | | | | 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@
* Sync parse.y with recent enhancements in hoststated.pyr2007-10-201-3/+5
| | | | | Fix behavior when running -n. henning@
* Allow '=' to end a number in all lexers.mpf2007-10-161-2/+2
| | | | Requested and OK deraadt@
* First step at making kroute IPv6 aware. This resulted in many additionalclaudio2007-10-161-37/+52
| | | | | | | changes -- some are so hairy that I left them out for later by commenting out larger blocks of code (just grep for XXX if you like to help). Get it in early so that we can work on. OK norby@
* in the lex... even inside quotes, a \ followed by space or tab shouldderaadt2007-10-161-2/+4
| | | | | | | | 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
* in all these programs using the same pfctl-derived parse.y, re-unify thederaadt2007-10-131-76/+148
| | | | | | | | 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.
* There is no need to support interface em0:<IP> anymore. Remove most of theclaudio2007-10-111-21/+3
| | | | code the rest will be reused somehow.
* From ospfd:claudio2007-10-111-2/+1
| | | | | | | | | Bye bye global ospf options. OSPF options are per area (at least the one flag that we set). So introduce a area_ospf_options() function that will return the correct flags for each area. This makes stub area support a lot easier. Don't check for OSPF_OPTION_E in the parent. OSPF_OPTION_E is per area and so the parent process has no way to know if it should redistribute or not.
* next step in the yylex unification: handle quoted strings in a nicer fashionderaadt2007-10-111-20/+32
| | | | | | | 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
* The router dead_interval switched from 32bit to a 16bit value in OSPFv3.claudio2007-10-091-2/+2
| | | | OK norby@
* Welcome ospf6dnorby2007-10-081-0/+1061
The new ospf6d daemon will support OSPFv3, basically OSPF for IPv6 networks. It is heavily based on ospfd(8), it is more or less a copy and paste of it. Currently some unneeded stuff has been removed and the trasition from IPv4 to IPv6 has begun. ospf6d is not very usefull at the moment, it is being imported to allow more people to work on it concurrently. Not yet connected to the builds. ok claudio@ dlg@