OpenBSD CVS

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


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.104 / (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_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.103: +6 -6 lines
Diff to previous 1.103 (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.103 / (download) - annotate - [select for diffs], Mon Jan 25 06:16:38 2021 UTC (3 years, 4 months ago) by dlg
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9
Changes since 1.102: +2 -2 lines
Diff to previous 1.102 (colored)

r1.102 forgot to tweak the "redistribute rtlabel" part of the grammar.

fixes "redistribute rtlabel foo" without "depend on".

Revision 1.102 / (download) - annotate - [select for diffs], Thu Jan 7 09:31:02 2021 UTC (3 years, 5 months ago) by claudio
Branch: MAIN
Changes since 1.101: +15 -13 lines
Diff to previous 1.101 (colored)

Fix multiple shift/reduce conflicts in the parser because of the dependon
synatx element with its optional / empty element. While this is needed for
redistribute statements it causes the conflicts in the interface sections
since there the statement can not be empty (this conflicts with empty new
lines handled in optnl). Add a dependonopt for redistribute statements
and make depend on no longer optional.
Also sync the curly bracket blocks (interface, area, ...) to be like
set blocks and the blocks in bgpd. This should result in more flexible
newline handling.
Tested by sthen@, benno@, Kapetanakis Giannis
OK benno@

Revision 1.101 / (download) - annotate - [select for diffs], Tue Dec 29 19:44:47 2020 UTC (3 years, 5 months ago) by benno
Branch: MAIN
Changes since 1.100: +3 -2 lines
Diff to previous 1.100 (colored)

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

Revision 1.100 / (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.99: +8 -5 lines
Diff to previous 1.99 (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.99 / (download) - annotate - [select for diffs], Tue Nov 19 09:55:55 2019 UTC (4 years, 6 months ago) by remi
Branch: MAIN
Changes since 1.98: +7 -2 lines
Diff to previous 1.98 (colored)

Add point-to-point support for broadcast interfaces.

tested by Kapetanakis Giannis
ok claudio@

Revision 1.98 / (download) - annotate - [select for diffs], Fri Jun 7 04:57:45 2019 UTC (5 years ago) by dlg
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.97: +22 -10 lines
Diff to previous 1.97 (colored)

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

ok remi@ (who did the same change to ospfctl, ospf6d, and ospf6ctl)
ok denis@
some grumbling from sthen@ and bluhm@ who didn't want output changed.

Revision 1.97 / (download) - annotate - [select for diffs], Thu May 16 05:49:22 2019 UTC (5 years ago) by denis
Branch: MAIN
Changes since 1.96: +1 -5 lines
Diff to previous 1.96 (colored)

Do not change router-id on reload if unspecified.

OK remi@

Revision 1.96 / (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.95: +32 -5 lines
Diff to previous 1.95 (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.95 / (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.94: +3 -3 lines
Diff to previous 1.94 (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.94 / (download) - annotate - [select for diffs], Fri Dec 28 19:25:10 2018 UTC (5 years, 5 months ago) by remi
Branch: MAIN
Changes since 1.93: +13 -3 lines
Diff to previous 1.93 (colored)

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

OK claudio@

Revision 1.93 / (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.92: +3 -2 lines
Diff to previous 1.92 (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.92 / (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.91: +4 -9 lines
Diff to previous 1.91 (colored)

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

"looks good" gilles@ halex@

Revision 1.91 / (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.90: +4 -4 lines
Diff to previous 1.90 (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.90 / (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.89: +5 -5 lines
Diff to previous 1.89 (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.89 / (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.88: +3 -3 lines
Diff to previous 1.88 (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.88 / (download) - annotate - [select for diffs], Mon Jun 11 18:21:47 2018 UTC (5 years, 11 months ago) by denis
Branch: MAIN
Changes since 1.87: +82 -49 lines
Diff to previous 1.87 (colored)

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

Thanks to otto@ for the initial diff.

OK benno@

Revision 1.87 / (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.86: +3 -1 lines
Diff to previous 1.86 (colored)

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

ok benno@

Revision 1.86 / (download) - annotate - [select for diffs], Sun Feb 11 02:27:33 2018 UTC (6 years, 3 months ago) by benno
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3
Changes since 1.85: +8 -3 lines
Diff to previous 1.85 (colored)

Use the new route filter ROUTE_PRIOFILTER in ospfd. Usually we only
need to see routes with a higher priority (lower value) than ospfds
own routes.
ok claudio, ok henning previous version, feedback from sthen

Revision 1.85 / (download) - annotate - [select for diffs], Fri Feb 9 22:52:54 2018 UTC (6 years, 3 months ago) by jca
Branch: MAIN
Changes since 1.84: +5 -5 lines
Diff to previous 1.84 (colored)

Style tweaks

ok remi@ benno@

Revision 1.84 / (download) - annotate - [select for diffs], Mon Feb 5 12:11:28 2018 UTC (6 years, 4 months ago) by remi
Branch: MAIN
Changes since 1.83: +74 -8 lines
Diff to previous 1.83 (colored)

Introduce "depend on". This allows ospfd to set the metric dependent
on the status of another interface.

in collaboration with benno@ jca@
OK benno@ jca@

Revision 1.83 / (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_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.82: +2 -3 lines
Diff to previous 1.82 (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.82 / (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.81: +7 -5 lines
Diff to previous 1.81 (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.81 / (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.80: +9 -1 lines
Diff to previous 1.80 (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.80 / (download) - annotate - [select for diffs], Sat Dec 5 12:20:13 2015 UTC (8 years, 6 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.79: +24 -1 lines
Diff to previous 1.79 (colored)

Pledge ospfd SE ("stdio inet mcast") and RDE ("stdio") move some code
around to make it possible. Parent can't be pledged at the moment because
of carp ioctl (carp demote). Putting it in so that people can test.
OK benno@

Revision 1.79 / (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_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.78: +4 -1 lines
Diff to previous 1.78 (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.78 / (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.77: +6 -6 lines
Diff to previous 1.77 (colored)

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

Revision 1.77 / (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.76: +8 -4 lines
Diff to previous 1.76 (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.76 / (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.75: +2 -2 lines
Diff to previous 1.75 (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.75 / (download) - annotate - [select for diffs], Mon Nov 25 12:59:34 2013 UTC (10 years, 6 months ago) by benno
Branch: MAIN
Changes since 1.74: +7 -7 lines
Diff to previous 1.74 (colored)

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

Revision 1.74 / (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.73: +8 -5 lines
Diff to previous 1.73 (colored)

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

Revision 1.73 / (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_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.72: +3 -1 lines
Diff to previous 1.72 (colored)

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

Revision 1.72 / (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.71: +4 -3 lines
Diff to previous 1.71 (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.71 / (download) - annotate - [select for diffs], Wed Mar 24 07:18:39 2010 UTC (14 years, 2 months ago) by gollo
Branch: MAIN
Changes since 1.70: +2 -2 lines
Diff to previous 1.70 (colored)

options must be sorted.

OK: henning@, claudio@

Revision 1.70 / (download) - annotate - [select for diffs], Tue Feb 16 08:39:05 2010 UTC (14 years, 3 months ago) by dlg
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.69: +36 -10 lines
Diff to previous 1.69 (colored)

implement support for fast hello packets.

if route-dead-time is set to "minimal" (rather than a number of
seconds), the dead time is set to 1 second and hellos are sent at
the interval specified by fast-hello-interval in msecs. this is non
standard wrt to the ospf rfc, but it does interoperate with at least
one other router vendor.

this allows much better responsiveness to l3 topology changes than
the standard intervals allow. if i yank a cable to one of my
upstreams, the routes adjust in a second rather than the default
of 40 i was running with before. the users dont even notice something
changed.

developed while working with joshua atterbury.
ok claudio@ as part of a larger diff.
dedicated to zan rowe who thinks she is a bigger nerd than me.

Revision 1.69 / (download) - annotate - [select for diffs], Tue Feb 16 08:22:42 2010 UTC (14 years, 3 months ago) by dlg
Branch: MAIN
Changes since 1.68: +14 -4 lines
Diff to previous 1.68 (colored)

allow spf-delay and spf-holdtime to be specified in msec so ospfd can
better respond to rapid topology changes.

developed while working with joshua atterbury
ok claudio@ as part of a larger diff.

Revision 1.68 / (download) - annotate - [select for diffs], Wed Nov 25 12:55:35 2009 UTC (14 years, 6 months ago) by dlg
Branch: MAIN
Changes since 1.67: +18 -0 lines
Diff to previous 1.67 (colored)

add support for include

ok claudio@

Revision 1.67 / (download) - annotate - [select for diffs], Fri Jun 5 04:12:52 2009 UTC (15 years ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.66: +10 -2 lines
Diff to previous 1.66 (colored)

Preliminary rdomain support, all hacked up by reyk@

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

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

looks right deraadt, krw
ok henning

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

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. Found with stsp@

Revision 1.64 / (download) - annotate - [select for diffs], Wed Jan 7 21:16:36 2009 UTC (15 years, 5 months ago) by claudio
Branch: MAIN
Changes since 1.63: +82 -74 lines
Diff to previous 1.63 (colored)

Full stub area support. This allows ABRs to announce a default network
summary LSA into stub areas so that these routers are able to reach the
outside of the area.
OK norby@

Revision 1.63 / (download) - annotate - [select for diffs], Mon Nov 24 18:28:02 2008 UTC (15 years, 6 months ago) by claudio
Branch: MAIN
Changes since 1.62: +2 -1 lines
Diff to previous 1.62 (colored)

Initial support for stub areas. The bit still missing is the redistribution
of the default summary net lsa on ABRs but that is comming. OK norby@

Revision 1.62 / (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.61: +5 -3 lines
Diff to previous 1.61 (colored)

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

Revision 1.61 / (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.60: +15 -14 lines
Diff to previous 1.60 (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.60 / (download) - annotate - [select for diffs], Fri Feb 22 10:56:50 2008 UTC (16 years, 3 months ago) by simon
Branch: MAIN
Changes since 1.59: +3 -2 lines
Diff to previous 1.59 (colored)

remove comma from type list, add missing semicolon for consistency

OK claudio@

Revision 1.59 / (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.58: +2 -10 lines
Diff to previous 1.58 (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.58 / (download) - annotate - [select for diffs], Sat Oct 20 13:29:44 2007 UTC (16 years, 7 months ago) by pyr
Branch: MAIN
Changes since 1.57: +5 -3 lines
Diff to previous 1.57 (colored)

forgot about ospfd in last commit.
ok hennin@ too.

Revision 1.57 / (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.56: +2 -2 lines
Diff to previous 1.56 (colored)

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

Revision 1.56 / (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.55: +4 -2 lines
Diff to previous 1.55 (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.55 / (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.54: +147 -76 lines
Diff to previous 1.54 (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.54 / (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.53: +32 -20 lines
Diff to previous 1.53 (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.53 / (download) - annotate - [select for diffs], Thu Oct 11 12:19:31 2007 UTC (16 years, 8 months ago) by claudio
Branch: MAIN
Changes since 1.52: +1 -2 lines
Diff to previous 1.52 (colored)

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.
OK norby@

Revision 1.52 / (download) - annotate - [select for diffs], Mon Oct 1 08:35:12 2007 UTC (16 years, 8 months ago) by norby
Branch: MAIN
Changes since 1.51: +5 -3 lines
Diff to previous 1.51 (colored)

fix alot of whitespace problems...

Revision 1.51 / (download) - annotate - [select for diffs], Wed Sep 12 09:59:09 2007 UTC (16 years, 9 months ago) by claudio
Branch: MAIN
Changes since 1.50: +77 -36 lines
Diff to previous 1.50 (colored)

Another parser.y that switches to parse numbers directly in the lexer.
Most complex part was "redistribute 10/8" which need special handling.
With and OK deraadt@, OK norby@

Revision 1.50 / (download) - annotate - [select for diffs], Wed Jul 11 14:10:25 2007 UTC (16 years, 11 months ago) by pyr
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.49: +7 -3 lines
Diff to previous 1.49 (colored)

make the demote count argument optional as advertised in the man page.

Revision 1.49 / (download) - annotate - [select for diffs], Tue Jun 19 16:45:15 2007 UTC (16 years, 11 months ago) by reyk
Branch: MAIN
Changes since 1.48: +12 -2 lines
Diff to previous 1.48 (colored)

add support for mapping route labels to AS-external route tags.

manpage bits from jmc@
ok norby@ claudio@

Revision 1.48 / (download) - annotate - [select for diffs], Tue May 29 22:08:25 2007 UTC (17 years ago) by claudio
Branch: MAIN
Changes since 1.47: +41 -1 lines
Diff to previous 1.47 (colored)

Demote support for ospfd. It is possible to specify a demote group on
interfaces and areas. With this carp setups using ospfd are more reliable
because we can fail over if the OSPF connectivity is (partially) lost.
OK norby@

Revision 1.47 / (download) - annotate - [select for diffs], Wed Mar 28 14:17:13 2007 UTC (17 years, 2 months ago) by claudio
Branch: MAIN
Changes since 1.46: +1 -2 lines
Diff to previous 1.46 (colored)

Remove unused variable found by lint.

Revision 1.46 / (download) - annotate - [select for diffs], Thu Mar 22 15:56:52 2007 UTC (17 years, 2 months ago) by claudio
Branch: MAIN
Changes since 1.45: +2 -2 lines
Diff to previous 1.45 (colored)

Somehow I forgot how to correctly sort in alphabetical order.
"router" needs to be added before "router-dead-time".
Figured out by Stuart Henderson

Revision 1.45 / (download) - annotate - [select for diffs], Wed Mar 21 10:54:30 2007 UTC (17 years, 2 months ago) by claudio
Branch: MAIN
Changes since 1.44: +13 -2 lines
Diff to previous 1.44 (colored)

Add support for RFC 3137: OSPF Stub Router Advertisement
This allows ospfd to announce networks without the need to transit traffic.
stub router is enabled if the fib is not coupled, net.inet.ip.forwarding is
not 1 or if the stub router global config option is set to yes.
OK norby@

Revision 1.44 / (download) - annotate - [select for diffs], Fri Mar 16 10:54:43 2007 UTC (17 years, 2 months ago) by claudio
Branch: MAIN
Changes since 1.43: +11 -3 lines
Diff to previous 1.43 (colored)

Make sure that the metric on redistributed prefixes is always != 0.
If no metric was specified for it to DEFAULT_REDIST_METRIC. While this was
checked for the simple case it was not done if only a metric type was
specified.  OK pyr@

Revision 1.43 / (download) - annotate - [select for diffs], Thu Feb 1 13:25:28 2007 UTC (17 years, 4 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.42: +2 -2 lines
Diff to previous 1.42 (colored)

whitespace cleanup, no binary change.

Revision 1.42 / (download) - annotate - [select for diffs], Sun Jan 14 13:20:17 2007 UTC (17 years, 4 months ago) by michele
Branch: MAIN
Changes since 1.41: +2 -2 lines
Diff to previous 1.41 (colored)

typo
metricr -> metric

Revision 1.41 / (download) - annotate - [select for diffs], Thu Jan 11 21:36:49 2007 UTC (17 years, 5 months ago) by claudio
Branch: MAIN
Changes since 1.40: +2 -3 lines
Diff to previous 1.40 (colored)

Join two lines.

Revision 1.40 / (download) - annotate - [select for diffs], Thu Dec 21 17:22:29 2006 UTC (17 years, 5 months ago) by claudio
Branch: MAIN
Changes since 1.39: +8 -8 lines
Diff to previous 1.39 (colored)

Unbreak redistribute default and make it possible to specify a metric for
the default route as well. OK norby@, michele@

Revision 1.39 / (download) - annotate - [select for diffs], Thu Dec 7 19:14:27 2006 UTC (17 years, 6 months ago) by claudio
Branch: MAIN
Changes since 1.38: +54 -6 lines
Diff to previous 1.38 (colored)

Make it possible to set the metric and LSA type for redistributed routes.
Mostly based on a diff by Pierre-Yves Ritschard (I just simplified the parser
code). OK norby@

Revision 1.38 / (download) - annotate - [select for diffs], Fri Nov 17 08:55:31 2006 UTC (17 years, 6 months ago) by claudio
Branch: MAIN
Changes since 1.37: +33 -8 lines
Diff to previous 1.37 (colored)

Support for multiple networks on one interface. Until now only the main
address of a interface could be used. Now it is possible to specify a
interface more than once if multiple networks are configured. An alternative
network can be specified via e.g. interface em0:10.0.5.1. The old interface
syntax without the IP still works and uses the main/first configured IP
address.
ospfd now needs to include the IP header on outgoing messages as it is not
possible to specifiy the source address in sendto(2). Additionally all
multicast joins and leaves have to be tracked.
OK norby@

Revision 1.37 / (download) - annotate - [select for diffs], Sun Oct 29 19:29:09 2006 UTC (17 years, 7 months ago) by claudio
Branch: MAIN
Changes since 1.36: +9 -9 lines
Diff to previous 1.36 (colored)

Allow braces to fit on a single line if only one or no argument is used.
This allows construct like these:
area 0.0.0.1 {
        interface lo0
        interface em1 { passive }
}

From Pierre-Yves Ritschard

Revision 1.36 / (download) - annotate - [select for diffs], Wed Oct 25 12:26:49 2006 UTC (17 years, 7 months ago) by claudio
Branch: MAIN
Changes since 1.35: +3 -9 lines
Diff to previous 1.35 (colored)

Remove a parser debug functionality that was never used in ospfd.
From Pierre-Yves Ritschard

Revision 1.35 / (download) - annotate - [select for diffs], Wed Oct 25 12:23:10 2006 UTC (17 years, 7 months ago) by claudio
Branch: MAIN
Changes since 1.34: +7 -22 lines
Diff to previous 1.34 (colored)

Use strtonum(3) instead of the hand made atoul. This solves an issue with
possible integer truncation because of the use of u_longs and u_int32_t in
the code. Initial diff by Pierre-Yves Ritschard but slightly modified version
commited.

Revision 1.34 / (download) - annotate - [select for diffs], Wed May 31 03:59:51 2006 UTC (18 years ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.33: +26 -1 lines
Diff to previous 1.33 (colored)

Support for "[no] redistribute 10.6/16", all routes that match into this
range will match this "rule". This should be it, now it is time to write
some documentation.

Revision 1.33 / (download) - annotate - [select for diffs], Wed May 31 03:24:06 2006 UTC (18 years ago) by claudio
Branch: MAIN
Changes since 1.32: +32 -24 lines
Diff to previous 1.32 (colored)

More redistribute fun. Add a possibility to deny redistribution of specified
routes via "no redistribute rtlabel admin". Redistribute rules are parsed
in order and the first match is used. Only exception is "redistribute default"
Which is independent of the other rules and can't be negated.

Revision 1.32 / (download) - annotate - [select for diffs], Wed May 31 02:18:23 2006 UTC (18 years ago) by pat
Branch: MAIN
Changes since 1.31: +2 -2 lines
Diff to previous 1.31 (colored)

Plug memory leak; ok claudio@

Revision 1.31 / (download) - annotate - [select for diffs], Tue May 30 22:06:14 2006 UTC (18 years ago) by claudio
Branch: MAIN
Changes since 1.30: +40 -20 lines
Diff to previous 1.30 (colored)

Now that rtlabels are accessable via sysctl we can use route lables to
define which routes should be redistributed via OSPF. So now you can
define the export list on a fine graded basis. More to come... OK norby@

Revision 1.30 / (download) - annotate - [select for diffs], Fri May 26 01:06:12 2006 UTC (18 years ago) by deraadt
Branch: MAIN
Changes since 1.29: +2 -4 lines
Diff to previous 1.29 (colored)

\<char> is <char> except for \<newline> -- no exceptions.  much like how
other things work.  ok henning

Revision 1.29 / (download) - annotate - [select for diffs], Mon Apr 24 20:18:03 2006 UTC (18 years, 1 month ago) by claudio
Branch: MAIN
Changes since 1.28: +29 -12 lines
Diff to previous 1.28 (colored)

Fix parser to match current behaviour and make auth-type et al. part of the
global and per area defaults. With this it is now possible to define one
set of auth-md keys and use them in every defined interface. OK norby@

Revision 1.28 / (download) - annotate - [select for diffs], Thu Apr 20 17:04:30 2006 UTC (18 years, 1 month ago) by claudio
Branch: MAIN
Changes since 1.27: +75 -163 lines
Diff to previous 1.27 (colored)

Simplify the defaults handling. This is long overdue and necessary to add
auth-type et al. to the main and area blocks. OK norby@

Revision 1.27 / (download) - annotate - [select for diffs], Wed Mar 15 13:29:45 2006 UTC (18 years, 2 months ago) by claudio
Branch: MAIN
Changes since 1.26: +24 -30 lines
Diff to previous 1.26 (colored)

There is no need to check iface != NULL. These parser rules are only allowed
if iface is set and so the check is superfluous. OK norby@

Revision 1.26 / (download) - annotate - [select for diffs], Wed Mar 15 13:25:33 2006 UTC (18 years, 2 months ago) by claudio
Branch: MAIN
Changes since 1.25: +6 -5 lines
Diff to previous 1.25 (colored)

Looks like auth-type simple was busted since a long time. We bcmp() a
c string with a lenght <= 8 with a buffer of size 8. Now in some cases
there can be trailing garbage after the c-string and so the bcmp() fails.
Found by Sergey Matveychuk who provided a similar patch.
OK norby@

Revision 1.25 / (download) - annotate - [select for diffs], Wed Mar 8 15:35:07 2006 UTC (18 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.24: +3 -3 lines
Diff to previous 1.24 (colored)

Spaces and other minor cleanup.

Revision 1.24 / (download) - annotate - [select for diffs], Fri Jan 20 00:01:20 2006 UTC (18 years, 4 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE, OPENBSD_3_9
Changes since 1.23: +2 -1 lines
Diff to previous 1.23 (colored)

Explicitly include limits.h if we are going to use its contents.

Revision 1.23 / (download) - annotate - [select for diffs], Thu Jan 5 15:53:36 2006 UTC (18 years, 5 months ago) by claudio
Branch: MAIN
Changes since 1.22: +1 -2 lines
Diff to previous 1.22 (colored)

Make ospfd respect carp(4) interfaces and their weird behaviour. They will
not be used to connect to a OSPF cloud and forced to be passive. With this
ospfd will only announce the carp interface route if the interface is master.
So you can connect a LAN in a redundant way to your ospf backbone. OK norby@

Revision 1.22 / (download) - annotate - [select for diffs], Thu Dec 15 20:19:48 2005 UTC (18 years, 5 months ago) by claudio
Branch: MAIN
Changes since 1.21: +14 -6 lines
Diff to previous 1.21 (colored)

Fix memory leaks in the parser. Make the string passed with area more strict.
Finaly implement clear_config(). OK norby@

Revision 1.21 / (download) - annotate - [select for diffs], Fri Nov 4 10:15:43 2005 UTC (18 years, 7 months ago) by claudio
Branch: MAIN
Changes since 1.20: +2 -1 lines
Diff to previous 1.20 (colored)

Make "interface em0 { }" work again. Reported and OK stevesk@

Revision 1.20 / (download) - annotate - [select for diffs], Sun Oct 30 23:01:38 2005 UTC (18 years, 7 months ago) by stevesk
Branch: MAIN
Changes since 1.19: +2 -5 lines
Diff to previous 1.19 (colored)

remove some unneeded #includes and correct keyword in error string;
ok claudio@

Revision 1.19 / (download) - annotate - [select for diffs], Fri Oct 28 14:51:57 2005 UTC (18 years, 7 months ago) by stevesk
Branch: MAIN
Changes since 1.18: +6 -6 lines
Diff to previous 1.18 (colored)

clean auth error messages; ok claudio@ msf@

Revision 1.18 / (download) - annotate - [select for diffs], Sat Sep 17 20:03:35 2005 UTC (18 years, 8 months ago) by msf
Branch: MAIN
Changes since 1.17: +34 -2 lines
Diff to previous 1.17 (colored)

- add get_rtr_id() based on bgpd's get_bgpid()
- remove rtr_id from struct iface we don't need to keep a copy of this value
  per interface
- replace all references to iface->rtr_id.s_addr with calls to ospfe_rtr_id()

ok claudio@ norby@

Revision 1.17 / (download) - annotate - [select for diffs], Thu Sep 15 20:24:46 2005 UTC (18 years, 8 months ago) by claudio
Branch: MAIN
Changes since 1.16: +2 -1 lines
Diff to previous 1.16 (colored)

auth-md-keyid 0 is valid but is not allowed on Cis^H^Hrap routers.
Default to id 1 and mention it in the man page.
From a discussion with msf@ OK norby@

Revision 1.16 / (download) - annotate - [select for diffs], Tue Jun 28 22:35:34 2005 UTC (18 years, 11 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.15: +9 -9 lines
Diff to previous 1.15 (colored)

Make it possible to specify interfaces just by using "interface em0" without
a {} block. Only drawback is that it is no longer possible to do
"interface em0\n{ ...".
OK henning@ norby@ some time ago

Revision 1.15 / (download) - annotate - [select for diffs], Thu May 26 18:46:16 2005 UTC (19 years ago) by norby
Branch: MAIN
Changes since 1.14: +7 -6 lines
Diff to previous 1.14 (colored)

Support dumping the configuration the way bgpd(8) does it.

This makes it possible to have ospfd(8) parse a configuration file and
display the parsed result.

ok claudio@

Revision 1.14 / (download) - annotate - [select for diffs], Mon May 23 19:59:02 2005 UTC (19 years ago) by norby
Branch: MAIN
Changes since 1.13: +6 -2 lines
Diff to previous 1.13 (colored)

Make the rfc1583compat flag changable in ospfd.conf(5).

ok claudio@

Revision 1.13 / (download) - annotate - [select for diffs], Tue Apr 12 09:54:59 2005 UTC (19 years, 2 months ago) by claudio
Branch: MAIN
Changes since 1.12: +22 -2 lines
Diff to previous 1.12 (colored)

Support for self originated AS-external LSA.
With "redistribute (static|connected|default|none)" it is possible to
tell ospfd which external routes should be announced.
Connected routes will be announced only if there is no corresponding
interface configured, in that case the prefix is not external.
Adding and removing of announced prefixes are done automaticaly.
OK norby@

Revision 1.12 / (download) - annotate - [select for diffs], Wed Apr 6 20:21:08 2005 UTC (19 years, 2 months ago) by norby
Branch: MAIN
Changes since 1.11: +16 -4 lines
Diff to previous 1.11 (colored)

Add check for key lengths. Based on diff from Jason Ackley.
Reworked by me.
ok claudio@

Revision 1.11 / (download) - annotate - [select for diffs], Thu Mar 31 19:32:10 2005 UTC (19 years, 2 months ago) by norby
Branch: MAIN
Changes since 1.10: +32 -4 lines
Diff to previous 1.10 (colored)

Add support for crypt authentication (MD5).

ok and input claudio@

Revision 1.10 / (download) - annotate - [select for diffs], Tue Mar 29 17:26:35 2005 UTC (19 years, 2 months ago) by norby
Branch: MAIN
Changes since 1.9: +11 -11 lines
Diff to previous 1.9 (colored)

The RFC never mentions anything about transfer, this should be transmit.

From Jason Ackley (thanks).

ok claudio@

Revision 1.9 / (download) - annotate - [select for diffs], Tue Mar 22 22:13:48 2005 UTC (19 years, 2 months ago) by norby
Branch: MAIN
Changes since 1.8: +3 -3 lines
Diff to previous 1.8 (colored)

Remove bool cruft.

ok claudio@

Revision 1.8 / (download) - annotate - [select for diffs], Sat Mar 12 11:03:05 2005 UTC (19 years, 3 months ago) by norby
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_7
Changes since 1.7: +0 -0 lines
Diff to previous 1.7 (colored)

Add "show rib" and "show rib detail" to ospfctl.

ok henning@

Revision 1.7 / (download) - annotate - [select for diffs], Sat Mar 12 10:49:12 2005 UTC (19 years, 3 months ago) by norby
Branch: MAIN
Changes since 1.6: +7 -4 lines
Diff to previous 1.6 (colored)

Small K&F.

ok henning@

Revision 1.6 / (download) - annotate - [select for diffs], Mon Mar 7 10:28:14 2005 UTC (19 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.5: +9 -9 lines
Diff to previous 1.5 (colored)

Track interface state (up/down) and media status. Simplify the code a bit
by using the kif/kroute info while allocating interfaces.

Revision 1.5 / (download) - annotate - [select for diffs], Sun Feb 27 08:21:15 2005 UTC (19 years, 3 months ago) by norby
Branch: MAIN
Changes since 1.4: +27 -3 lines
Diff to previous 1.4 (colored)

SPF and route table calculation.

Calculate Shortest Path Tree for each area known in the link state
database.

The Shortest Path Tree is used as input for route table calculation.
Route tabled is calculated and the result is inserted into the kernel
route table.

ok claudio@

Revision 1.4 / (download) - annotate - [select for diffs], Wed Feb 2 21:02:25 2005 UTC (19 years, 4 months ago) by norby
Branch: MAIN
Changes since 1.3: +2 -2 lines
Diff to previous 1.3 (colored)

Change keyword fibupdate to fib-update, for consistency with bgpd.conf(5).

ok claudio@ henning@

Revision 1.3 / (download) - annotate - [select for diffs], Wed Feb 2 19:47:20 2005 UTC (19 years, 4 months ago) by norby
Branch: MAIN
Changes since 1.2: +8 -8 lines
Diff to previous 1.2 (colored)

Typo in constant.

ok claudio@ henning@

Revision 1.2 / (download) - annotate - [select for diffs], Fri Jan 28 17:53:33 2005 UTC (19 years, 4 months ago) by norby
Branch: MAIN
Changes since 1.1: +2 -2 lines
Diff to previous 1.1 (colored)

Change my email address to the OpenBSD one since Ericsson has nothing to
do with this software, just happend to be my only valid email address at
the time.

Revision 1.1 / (download) - annotate - [select for diffs], Fri Jan 28 14:05:40 2005 UTC (19 years, 4 months ago) by claudio
Branch: MAIN

Welcome ospfd
started by Esben Norby some time ago by using the imsg/three process framework
of bgpd. He implemented the basic concept plus the ospf finite state machines.
Later I joined and helped him cleanup, debug and extend his work.
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 basic protocol works for broadcast networks and the LS database is
synchronized and updated. It is not possible to be DR or BDR on a network
and other interface types like point-to-point are not yet supported.
The shortest path tree is not calculated and so no routing information is
exchanged with the kernel FIB.

Not yet connected to the builds.
OK henning@

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.