OpenBSD CVS

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


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.40 / (download) - annotate - [select for diffs], Fri Oct 15 15:01:27 2021 UTC (2 years, 7 months ago) by naddy
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, HEAD
Changes since 1.39: +13 -13 lines
Diff to previous 1.39 (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.39 / (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_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.38: +3 -3 lines
Diff to previous 1.38 (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.38 / (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.37: +3 -2 lines
Diff to previous 1.37 (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.37 / (download) - annotate - [select for diffs], Fri Sep 7 07:35:30 2018 UTC (5 years, 9 months ago) by miko
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.36: +4 -9 lines
Diff to previous 1.36 (colored)

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

"looks good" gilles@ halex@

Revision 1.36 / (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.35: +3 -3 lines
Diff to previous 1.35 (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.35 / (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.34: +4 -4 lines
Diff to previous 1.34 (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.34 / (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.33: +3 -3 lines
Diff to previous 1.33 (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.33 / (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.32: +3 -1 lines
Diff to previous 1.32 (colored)

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

ok benno@

Revision 1.32 / (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.31: +2 -3 lines
Diff to previous 1.31 (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.31 / (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.30: +7 -5 lines
Diff to previous 1.30 (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.30 / (download) - annotate - [select for diffs], Tue Jun 21 21:35:24 2016 UTC (7 years, 11 months ago) by benno
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.29: +9 -1 lines
Diff to previous 1.29 (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.29 / (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.28: +4 -1 lines
Diff to previous 1.28 (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.28 / (download) - annotate - [select for diffs], Fri Nov 14 03:20:36 2014 UTC (9 years, 6 months ago) by doug
Branch: MAIN
Changes since 1.27: +4 -2 lines
Diff to previous 1.27 (colored)

Add gcc printf format attributes to yyerror() in parse.y files.
No yyerror() calls needed to be changed.

ok bluhm@

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

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

Revision 1.26 / (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.25: +2 -2 lines
Diff to previous 1.25 (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.25 / (download) - annotate - [select for diffs], Mon Nov 25 12:54:14 2013 UTC (10 years, 6 months ago) by benno
Branch: MAIN
Changes since 1.24: +7 -7 lines
Diff to previous 1.24 (colored)

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

Revision 1.24 / (download) - annotate - [select for diffs], Sun Apr 21 04:33:41 2013 UTC (11 years, 1 month ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.23: +2 -3 lines
Diff to previous 1.23 (colored)

the DVMRP protocol generation number can work beyond 2038 because it
is unsigned.  Cast it specifically, with a comment, to make this more
clear.

Revision 1.23 / (download) - annotate - [select for diffs], Wed Mar 6 21:42:40 2013 UTC (11 years, 3 months ago) by sthen
Branch: MAIN
Changes since 1.22: +7 -5 lines
Diff to previous 1.22 (colored)

as done in ospf{,6}d/relayd, sync yyerror in various other daemons with
that from bgpd, so that it logs to syslog when daemonized.

Revision 1.22 / (download) - annotate - [select for diffs], Fri Dec 31 21:22:42 2010 UTC (13 years, 5 months ago) by guenther
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, OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.21: +2 -1 lines
Diff to previous 1.21 (colored)

Add missing #includes instead of assuming that some system header pulls in
the needed bits

ok deraadt@, millert@

Revision 1.21 / (download) - annotate - [select for diffs], Tue Aug 3 18:42:40 2010 UTC (13 years, 10 months ago) by henning
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.20: +4 -3 lines
Diff to previous 1.20 (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.20 / (download) - annotate - [select for diffs], Fri Sep 4 13:11:45 2009 UTC (14 years, 9 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.19: +3 -1 lines
Diff to previous 1.19 (colored)

Dvrmpd inherited the same yesno porblem from bgpd. Make sure it throws
a proper syntax error.

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

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

looks right deraadt, krw
ok henning

Revision 1.18 / (download) - annotate - [select for diffs], Sun Dec 7 16:37:04 2008 UTC (15 years, 6 months ago) by michele
Branch: MAIN
CVS Tags: OPENBSD_4_5_BASE, OPENBSD_4_5
Changes since 1.17: +1 -2 lines
Diff to previous 1.17 (colored)

Kill src_node structure. It is mostly redundant with rt_node and
adds unneeded complexity. Move any stuff to rt_node structure.

Revision 1.17 / (download) - annotate - [select for diffs], Fri Oct 17 14:32:47 2008 UTC (15 years, 7 months ago) by henning
Branch: MAIN
Changes since 1.16: +5 -3 lines
Diff to previous 1.16 (colored)

bring in findeol() fix from pfctl

Revision 1.16 / (download) - annotate - [select for diffs], Wed Jul 2 08:52:30 2008 UTC (15 years, 11 months ago) by norby
Branch: MAIN
CVS Tags: OPENBSD_4_4_BASE, OPENBSD_4_4
Changes since 1.15: +6 -1 lines
Diff to previous 1.15 (colored)

Prevent dvmrpd from using illegal ifindex's.
Report and fix from Matthew Dempsky.

Revision 1.15 / (download) - annotate - [select for diffs], Wed Feb 27 15:36:42 2008 UTC (16 years, 3 months ago) by mpf
Branch: MAIN
CVS Tags: OPENBSD_4_3_BASE, OPENBSD_4_3
Changes since 1.14: +2 -2 lines
Diff to previous 1.14 (colored)

Unbreak parser by initializing topfile correctly.
I got fooled by patch(1). Sorry.

Revision 1.14 / (download) - annotate - [select for diffs], Tue Feb 26 10:09:58 2008 UTC (16 years, 3 months ago) by mpf
Branch: MAIN
Changes since 1.13: +15 -14 lines
Diff to previous 1.13 (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.13 / (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.12: +2 -10 lines
Diff to previous 1.12 (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.12 / (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.11: +5 -3 lines
Diff to previous 1.11 (colored)

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

Revision 1.11 / (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.10: +2 -2 lines
Diff to previous 1.10 (colored)

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

Revision 1.10 / (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.9: +4 -2 lines
Diff to previous 1.9 (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.9 / (download) - annotate - [select for diffs], Sat Oct 13 16:35:20 2007 UTC (16 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.8: +144 -73 lines
Diff to previous 1.8 (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.8 / (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.7: +29 -19 lines
Diff to previous 1.7 (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.7 / (download) - annotate - [select for diffs], Wed Sep 12 02:07:07 2007 UTC (16 years, 9 months ago) by deraadt
Branch: MAIN
Changes since 1.6: +8 -8 lines
Diff to previous 1.6 (colored)

spacing

Revision 1.6 / (download) - annotate - [select for diffs], Tue Sep 11 23:06:37 2007 UTC (16 years, 9 months ago) by deraadt
Branch: MAIN
Changes since 1.5: +2 -2 lines
Diff to previous 1.5 (colored)

macro argument unused, using local instead; spotted by mpf

Revision 1.5 / (download) - annotate - [select for diffs], Tue Sep 11 22:15:20 2007 UTC (16 years, 9 months ago) by deraadt
Branch: MAIN
Changes since 1.4: +49 -27 lines
Diff to previous 1.4 (colored)

extend lex to spot numbers in the stream, without impacting the parsing
of ip addresses and such.  this change is being pushed into all the pfctl
derived parsers, starting with the easy ones;  ok claudio michele

Revision 1.4 / (download) - annotate - [select for diffs], Wed Mar 21 19:33:48 2007 UTC (17 years, 2 months ago) by michele
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.3: +2 -1 lines
Diff to previous 1.3 (colored)

Added code to parse unicast routes learned from route report packets.
Now we are able to select correctly designated forwarders and downstream
dependent routers per interface.

Tested and OK norby@

Revision 1.3 / (download) - annotate - [select for diffs], Wed Oct 25 18:55:41 2006 UTC (17 years, 7 months ago) by henning
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.2: +7 -22 lines
Diff to previous 1.2 (colored)

strtonum, Pierre-Yves Ritschard <pyr@spootnik.org>

Revision 1.2 / (download) - annotate - [select for diffs], Wed Oct 25 18:52:13 2006 UTC (17 years, 7 months ago) by henning
Branch: MAIN
Changes since 1.1: +3 -9 lines
Diff to previous 1.1 (colored)

remove unused debug crap, that years ago accidently hit the tree with
bgpd (2004 :)), and spread ;(

Revision 1.1 / (download) - annotate - [select for diffs], Thu Jun 1 14:12:20 2006 UTC (18 years ago) by norby
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE, OPENBSD_4_0

Welcome dvmrpd
started by Esben Norby some time ago by using the imsg/three process framework
of ospfd.
Right now it is not particularly useful, major parts are still missing but is
imported to allow more people to work on it.

Status:

The IGMP part is mostly complete, allowing clients to join and leave groups.
Election the IGMP querier of a network is also functional, only thing missing is
some corner cases when going from non-querier to querier.

About half of the DVMRP is functional, probes and route reports are functional.

Multicast streams can be detected and the MFC can be manipulated.
The RIB is not complete but operational.

Not yet connected to the builds.

OK claudio@

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.