OpenBSD CVS

CVS log for src/usr.sbin/ospf6d/parse.y


[BACK] Up to [local] / src / usr.sbin / ospf6d

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.52 / (download) - annotate - [select for diffs], Tue Jul 4 02:56:11 2023 UTC (11 months ago) by dlg
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, HEAD
Changes since 1.51: +2 -2 lines
Diff to previous 1.51 (colored)

a little knf, no functional change

Revision 1.51 / (download) - annotate - [select for diffs], Fri Oct 15 15:01:28 2021 UTC (2 years, 7 months ago) by naddy
Branch: MAIN
CVS Tags: OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1
Changes since 1.50: +6 -6 lines
Diff to previous 1.50 (colored)

Don't declare variables as "unsigned char *" that are passed to
functions that take "char *" arguments.  Where such chars are
assigned to int or passed to ctype functions, explicitly cast them
to unsigned char.

For OpenBSD's clang, -Wpointer-sign has been disabled by default,
but when the parse.y code was built elsewhere, the compiler would
complain.

With help from millert@
ok benno@ deraadt@

Revision 1.50 / (download) - annotate - [select for diffs], Tue Dec 29 19:44:26 2020 UTC (3 years, 5 months ago) by benno
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9
Changes since 1.49: +3 -2 lines
Diff to previous 1.49 (colored)

getifaddrs() can return entries where ifa_addr is NULL. Check for this
before accessing anything in ifa_addr.
ok claudio@

Revision 1.49 / (download) - annotate - [select for diffs], Tue Jan 21 20:38:52 2020 UTC (4 years, 4 months ago) by remi
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.48: +8 -5 lines
Diff to previous 1.48 (colored)

Allow the interface setting "type p2p" to be configured globallz or per
area. Most of the other interface settings allow this.

ok denis@

Revision 1.48 / (download) - annotate - [select for diffs], Thu Dec 26 10:24:18 2019 UTC (4 years, 5 months ago) by remi
Branch: MAIN
Changes since 1.47: +7 -2 lines
Diff to previous 1.47 (colored)

Add point-to-point support for broadcast interfaces.

tested by Kapetanakis Giannis
ok denis@

Revision 1.47 / (download) - annotate - [select for diffs], Mon Dec 23 07:33:49 2019 UTC (4 years, 5 months ago) by denis
Branch: MAIN
Changes since 1.46: +2 -2 lines
Diff to previous 1.46 (colored)

Area is now part of struct iface

OK remi@

Revision 1.46 / (download) - annotate - [select for diffs], Mon Dec 16 08:28:33 2019 UTC (4 years, 5 months ago) by denis
Branch: MAIN
Changes since 1.45: +6 -2 lines
Diff to previous 1.45 (colored)

Rework route priority filter.

reads OK benno@ remi@

Revision 1.45 / (download) - annotate - [select for diffs], Tue Jun 11 05:00:09 2019 UTC (4 years, 11 months ago) by remi
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.44: +13 -1 lines
Diff to previous 1.44 (colored)

Introduce conf_clear_redist_list() (from ospfd) and use it in all 3 procs.

ok benno@

Revision 1.44 / (download) - annotate - [select for diffs], Sun May 26 09:27:09 2019 UTC (5 years ago) by remi
Branch: MAIN
Changes since 1.43: +22 -10 lines
Diff to previous 1.43 (colored)

Allow specifying area by number as well as id. No changes to outputs.

reads OK to kn@
OK denis@

Revision 1.43 / (download) - annotate - [select for diffs], Mon Apr 29 05:14:38 2019 UTC (5 years, 1 month ago) by remi
Branch: MAIN
Changes since 1.42: +28 -5 lines
Diff to previous 1.42 (colored)

Check that depend on interfaces are in the same rdomain. If they are not
the daemon wouldn't notice state changes for those interfaces.

ok benno@

Revision 1.42 / (download) - annotate - [select for diffs], Wed Feb 13 22:57:08 2019 UTC (5 years, 3 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.41: +3 -3 lines
Diff to previous 1.41 (colored)

(unsigned) means (unsigned int) which on ptrdiff_t or size_t or other
larger types really is a range reduction...
Almost any cast to (unsigned) is a bug.
ok millert tb benno

Revision 1.41 / (download) - annotate - [select for diffs], Sat Dec 29 16:04:31 2018 UTC (5 years, 5 months ago) by remi
Branch: MAIN
Changes since 1.40: +13 -3 lines
Diff to previous 1.40 (colored)

Add config option fib-priority to set a custom prio for routes ospf6d
inserts into the kernel routing table.

OK denis@

Revision 1.40 / (download) - annotate - [select for diffs], Thu Nov 1 00:18:44 2018 UTC (5 years, 7 months ago) by sashan
Branch: MAIN
Changes since 1.39: +3 -2 lines
Diff to previous 1.39 (colored)

- odd condition/test in PF lexer
  (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@

Revision 1.39 / (download) - annotate - [select for diffs], Fri Sep 7 07:35:31 2018 UTC (5 years, 9 months ago) by miko
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.38: +4 -9 lines
Diff to previous 1.38 (colored)

replace malloc()+strlcpy() with strndup() in cmdline_symset().

"looks good" gilles@ halex@

Revision 1.38 / (download) - annotate - [select for diffs], Thu Jul 12 13:45:03 2018 UTC (5 years, 10 months ago) by remi
Branch: MAIN
Changes since 1.37: +33 -2 lines
Diff to previous 1.37 (colored)

Add support for rdomains.

small quirk from tb@
ok phessler@

Revision 1.37 / (download) - annotate - [select for diffs], Thu Jul 12 12:19:05 2018 UTC (5 years, 10 months ago) by remi
Branch: MAIN
Changes since 1.36: +46 -4 lines
Diff to previous 1.36 (colored)

With the "depend on" option routes are sent out with a metric of 65535 if
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@

Revision 1.36 / (download) - annotate - [select for diffs], Wed Jul 11 10:23:47 2018 UTC (5 years, 11 months ago) by remi
Branch: MAIN
Changes since 1.35: +1 -2 lines
Diff to previous 1.35 (colored)

remove wrong comment

ok jca@ tb@

Revision 1.35 / (download) - annotate - [select for diffs], Wed Jul 11 07:39:22 2018 UTC (5 years, 11 months ago) by krw
Branch: MAIN
Changes since 1.34: +5 -5 lines
Diff to previous 1.34 (colored)

Do for most running out of memory err() what was done for most running
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@

Revision 1.34 / (download) - annotate - [select for diffs], Mon Jul 9 12:05:11 2018 UTC (5 years, 11 months ago) by krw
Branch: MAIN
Changes since 1.33: +5 -5 lines
Diff to previous 1.33 (colored)

No need to mention which memory allocation entry point failed (malloc,
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@

Revision 1.33 / (download) - annotate - [select for diffs], Sun Jul 8 17:15:07 2018 UTC (5 years, 11 months ago) by krw
Branch: MAIN
Changes since 1.32: +3 -3 lines
Diff to previous 1.32 (colored)

Be consistent in warn() and log_warn() usage when
running out of memory.

Next step, be correct *and* consistent.

ok dennis@ tb@ benno@ schwarze@

Revision 1.32 / (download) - annotate - [select for diffs], Mon Jun 11 18:22:56 2018 UTC (5 years, 11 months ago) by denis
Branch: MAIN
Changes since 1.31: +82 -49 lines
Diff to previous 1.31 (colored)

Fix an off-by-one line count when using include statements.

Thanks to otto@ for the initial diff.

OK benno@, remi@

Revision 1.31 / (download) - annotate - [select for diffs], Thu Apr 26 14:12:19 2018 UTC (6 years, 1 month ago) by krw
Branch: MAIN
Changes since 1.30: +3 -1 lines
Diff to previous 1.30 (colored)

Plug leak in error case of the common 'varset' implementations.

ok benno@

Revision 1.30 / (download) - annotate - [select for diffs], Thu Jan 5 13:53:09 2017 UTC (7 years, 5 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.29: +2 -3 lines
Diff to previous 1.29 (colored)

Replace hand-rolled for(;;) emptying of 'symhead' TAILQ with more
modern TAILQ_FOREACH_SAFE().

No intentional functional change.

ok millert@ bluhm@ gilles@

Revision 1.29 / (download) - annotate - [select for diffs], Thu Jan 5 12:42:18 2017 UTC (7 years, 5 months ago) by krw
Branch: MAIN
Changes since 1.28: +7 -5 lines
Diff to previous 1.28 (colored)

Replace symset()'s hand-rolled for(;;) traversal of 'symhead' TAILQ
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@

Revision 1.28 / (download) - annotate - [select for diffs], Tue Jun 21 21:35:25 2016 UTC (7 years, 11 months ago) by benno
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.27: +9 -1 lines
Diff to previous 1.27 (colored)

do not allow whitespace in macro names, i.e. "this is" = "a variable".
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@

Revision 1.27 / (download) - annotate - [select for diffs], Thu Nov 20 05:51:20 2014 UTC (9 years, 6 months ago) by jsg
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9, OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.26: +4 -1 lines
Diff to previous 1.26 (colored)

Don't allow embedded nul characters in strings.
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@

Revision 1.26 / (download) - annotate - [select for diffs], Mon Nov 3 07:40:31 2014 UTC (9 years, 7 months ago) by bluhm
Branch: MAIN
Changes since 1.25: +6 -6 lines
Diff to previous 1.25 (colored)

Convert the logic in yyerror().  Instead of creating a temporary
format string, create a temporary message.
OK deraadt@ claudio@

Revision 1.25 / (download) - annotate - [select for diffs], Sun Nov 2 00:22:00 2014 UTC (9 years, 7 months ago) by doug
Branch: MAIN
Changes since 1.24: +8 -4 lines
Diff to previous 1.24 (colored)

Add gcc format attributes to parse.y for ospf{6,}d.

Fix a few yyerror() lines that are missing arguments.

ok claudio@ sthen@

Revision 1.24 / (download) - annotate - [select for diffs], Wed Jan 22 00:21:16 2014 UTC (10 years, 4 months ago) by henning
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.23: +2 -2 lines
Diff to previous 1.23 (colored)

relax the cfg file secrecy check slightly to allow group readability
default permissions and mtree NOT changed.
prodded by benno, ok phessler benno jmatthew theo pelikan florian

Revision 1.23 / (download) - annotate - [select for diffs], Mon Nov 25 12:59:13 2013 UTC (10 years, 6 months ago) by benno
Branch: MAIN
Changes since 1.22: +7 -7 lines
Diff to previous 1.22 (colored)

use u_char for buffers in yylex, for ctype calls
found by millert@, ok deraadt@

Revision 1.22 / (download) - annotate - [select for diffs], Wed Mar 6 21:36:57 2013 UTC (11 years, 3 months ago) by sthen
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.21: +8 -5 lines
Diff to previous 1.21 (colored)

sync yyerror() with version in bgpd so that it logs to syslog when daemonized.
ok florian@

Revision 1.21 / (download) - annotate - [select for diffs], Mon Jun 27 03:07:26 2011 UTC (12 years, 11 months ago) by dlg
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.20: +19 -1 lines
Diff to previous 1.20 (colored)

bring include support for config files in from ospfd.

sure deraadt@

Revision 1.20 / (download) - annotate - [select for diffs], Mon Dec 13 13:43:37 2010 UTC (13 years, 5 months ago) by bluhm
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.19: +3 -1 lines
Diff to previous 1.19 (colored)

Do not use a carp address as ospf router id because it is not unique.
ok claudio@

Revision 1.19 / (download) - annotate - [select for diffs], Sun Aug 22 21:15:25 2010 UTC (13 years, 9 months ago) by bluhm
Branch: MAIN
Changes since 1.18: +47 -52 lines
Diff to previous 1.18 (colored)

Redistributing the default route with ospf6d did not work correctly.
- 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@

Revision 1.18 / (download) - annotate - [select for diffs], Tue Aug 3 18:42:41 2010 UTC (13 years, 10 months ago) by henning
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.17: +4 -3 lines
Diff to previous 1.17 (colored)

fix linecount bug with comments spanning multiple lines
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?

Revision 1.17 / (download) - annotate - [select for diffs], Thu Jul 1 19:47:04 2010 UTC (13 years, 11 months ago) by bluhm
Branch: MAIN
Changes since 1.16: +2 -2 lines
Diff to previous 1.16 (colored)

Fix all white space bugs in ospf6d at once.  No binary change.
ok claudio@

Revision 1.16 / (download) - annotate - [select for diffs], Tue Mar 31 21:03:49 2009 UTC (15 years, 2 months ago) by tobias
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7, OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.15: +7 -3 lines
Diff to previous 1.15 (colored)

Fixed memory leaks which would occur if the second of two memory
allocations fails.

looks right deraadt, krw
ok henning

Revision 1.15 / (download) - annotate - [select for diffs], Mon Jan 26 23:20:57 2009 UTC (15 years, 4 months ago) by stsp
Branch: MAIN
CVS Tags: OPENBSD_4_5_BASE, OPENBSD_4_5
Changes since 1.14: +2 -2 lines
Diff to previous 1.14 (colored)

Same fix as just committed to ospfd:
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@

Revision 1.14 / (download) - annotate - [select for diffs], Fri Oct 17 13:02:55 2008 UTC (15 years, 7 months ago) by henning
Branch: MAIN
Changes since 1.13: +5 -3 lines
Diff to previous 1.13 (colored)

bring in the findeol() fix from pfctl. list of affected parsers by sthen

Revision 1.13 / (download) - annotate - [select for diffs], Tue Feb 26 10:09:58 2008 UTC (16 years, 3 months ago) by mpf
Branch: MAIN
CVS Tags: OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3
Changes since 1.12: +15 -14 lines
Diff to previous 1.12 (colored)

Have popfile() also close the main config file,
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@

Revision 1.12 / (download) - annotate - [select for diffs], Thu Dec 13 08:54:05 2007 UTC (16 years, 6 months ago) by claudio
Branch: MAIN
Changes since 1.11: +6 -32 lines
Diff to previous 1.11 (colored)

Monster commit of stuff I did mostly last month. What it does:
 * 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

Revision 1.11 / (download) - annotate - [select for diffs], Mon Nov 12 23:59:41 2007 UTC (16 years, 7 months ago) by mpf
Branch: MAIN
Changes since 1.10: +2 -10 lines
Diff to previous 1.10 (colored)

Remove space/tab compression function from lgetc() and replace
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@

Revision 1.10 / (download) - annotate - [select for diffs], Sat Oct 20 13:26:50 2007 UTC (16 years, 7 months ago) by pyr
Branch: MAIN
Changes since 1.9: +5 -3 lines
Diff to previous 1.9 (colored)

Sync parse.y with recent enhancements in hoststated.
Fix behavior when running -n.
henning@

Revision 1.9 / (download) - annotate - [select for diffs], Tue Oct 16 20:01:23 2007 UTC (16 years, 7 months ago) by mpf
Branch: MAIN
Changes since 1.8: +2 -2 lines
Diff to previous 1.8 (colored)

Allow '=' to end a number in all lexers.
Requested and OK deraadt@

Revision 1.8 / (download) - annotate - [select for diffs], Tue Oct 16 08:41:56 2007 UTC (16 years, 7 months ago) by claudio
Branch: MAIN
Changes since 1.7: +52 -37 lines
Diff to previous 1.7 (colored)

First step at making kroute IPv6 aware. This resulted in many additional
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@

Revision 1.7 / (download) - annotate - [select for diffs], Tue Oct 16 06:06:49 2007 UTC (16 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.6: +4 -2 lines
Diff to previous 1.6 (colored)

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).
pointed out by mpf, discussed with pyr

Revision 1.6 / (download) - annotate - [select for diffs], Sat Oct 13 16:35:22 2007 UTC (16 years, 8 months ago) by deraadt
Branch: MAIN
Changes since 1.5: +148 -76 lines
Diff to previous 1.5 (colored)

in all these programs using the same pfctl-derived parse.y, re-unify the
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.

Revision 1.5 / (download) - annotate - [select for diffs], Thu Oct 11 21:29:53 2007 UTC (16 years, 8 months ago) by claudio
Branch: MAIN
Changes since 1.4: +3 -21 lines
Diff to previous 1.4 (colored)

There is no need to support interface em0:<IP> anymore. Remove most of the
code the rest will be reused somehow.

Revision 1.4 / (download) - annotate - [select for diffs], Thu Oct 11 19:02:47 2007 UTC (16 years, 8 months ago) by claudio
Branch: MAIN
Changes since 1.3: +1 -2 lines
Diff to previous 1.3 (colored)

From ospfd:
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.

Revision 1.3 / (download) - annotate - [select for diffs], Thu Oct 11 14:39:17 2007 UTC (16 years, 8 months ago) by deraadt
Branch: MAIN
Changes since 1.2: +32 -20 lines
Diff to previous 1.2 (colored)

next step in the yylex unification: handle quoted strings in a nicer fashion
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

Revision 1.2 / (download) - annotate - [select for diffs], Tue Oct 9 06:12:04 2007 UTC (16 years, 8 months ago) by claudio
Branch: MAIN
Changes since 1.1: +2 -2 lines
Diff to previous 1.1 (colored)

The router dead_interval switched from 32bit to a 16bit value in OSPFv3.
OK norby@

Revision 1.1 / (download) - annotate - [select for diffs], Mon Oct 8 10:44:51 2007 UTC (16 years, 8 months ago) by norby
Branch: MAIN

Welcome ospf6d

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@

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.