OpenBSD CVS

CVS log for src/usr.sbin/ospfd/ospfe.c


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.114 / (download) - annotate - [select for diffs], Wed Dec 13 15:34:27 2023 UTC (5 months, 3 weeks ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, HEAD
Changes since 1.113: +2 -2 lines
Diff to previous 1.113 (colored)

Use imsg_get_fd() to access the control fd.
OK tb@

Revision 1.113 / (download) - annotate - [select for diffs], Mon Jul 3 09:40:47 2023 UTC (11 months, 1 week ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_4_BASE, OPENBSD_7_4
Changes since 1.112: +5 -5 lines
Diff to previous 1.112 (colored)

Use ibuf_data() instead of directly accessing ibuf->buf.
OK tb@

Revision 1.112 / (download) - annotate - [select for diffs], Tue Jun 20 15:19:55 2023 UTC (11 months, 2 weeks ago) by claudio
Branch: MAIN
Changes since 1.111: +20 -17 lines
Diff to previous 1.111 (colored)

Update ospfd to use new ibuf api.

This mostly moves away from memcpy(ibuf_seek(buf, off, size), data, size) to
ibuf_set(buf, off, data, size). Also ibuf_reserve() is replaced with
ibuf_add_zero().

OK tb@

Revision 1.111 / (download) - annotate - [select for diffs], Wed Mar 8 04:43:14 2023 UTC (15 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_7_3_BASE, OPENBSD_7_3
Changes since 1.110: +1 -4 lines
Diff to previous 1.110 (colored)

Delete obsolete /* ARGSUSED */ lint comments.

ok miod@ millert@

Revision 1.110 / (download) - annotate - [select for diffs], Tue Jan 19 09:37:53 2021 UTC (3 years, 4 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9
Changes since 1.109: +12 -12 lines
Diff to previous 1.109 (colored)

Make the imsg event structures static, properly define ospfd_process and
rename nconf in the ospf engine to noeconf. This fixes the last common
symbols in ospfd.

Revision 1.109 / (download) - annotate - [select for diffs], Tue Jan 19 09:33:38 2021 UTC (3 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.108: +2 -4 lines
Diff to previous 1.108 (colored)

Internalize a few more things into the control code. Both control_state
and ctl_conns are not really needed outside of control.c

Revision 1.108 / (download) - annotate - [select for diffs], Tue Jan 19 09:29:49 2021 UTC (3 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.107: +1 -5 lines
Diff to previous 1.107 (colored)

Use a static pkt_ptr buffer instead of allocating it dynamically.
Removes another -fno-common issue from the build.

Revision 1.107 / (download) - annotate - [select for diffs], Mon Nov 2 00:29:58 2020 UTC (3 years, 7 months ago) by dlg
Branch: MAIN
Changes since 1.106: +3 -1 lines
Diff to previous 1.106 (colored)

apply the "depend on" logic in the the default handling of rtr links.

this fixes the use of "depend on" in my situation, which is an
Ethernet (broadcast) interface where I'm actually peering with
multiple routers so i don't have "type p2p" set. with this the ospf
peers now know how to route around my firewalls when their carp
interfaces are in the backup state.

discussed with claudio@ and jmatthew@
ok remi@

Revision 1.106 / (download) - annotate - [select for diffs], Tue Apr 23 06:18:02 2019 UTC (5 years, 1 month ago) by remi
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.105: +2 -2 lines
Diff to previous 1.105 (colored)

whitespace fix

Revision 1.105 / (download) - annotate - [select for diffs], Tue Apr 23 06:15:14 2019 UTC (5 years, 1 month ago) by remi
Branch: MAIN
Changes since 1.104: +3 -2 lines
Diff to previous 1.104 (colored)

Use the network address instead of the interface address for the "link id"
of P2P interfaces "stub net" LS.

This is related to revision 1.77 of rde_spf.c.

Problem reported by Mitchll Krome on tech@.

ok benno@

Revision 1.104 / (download) - annotate - [select for diffs], Tue Apr 23 06:08:57 2019 UTC (5 years, 1 month ago) by remi
Branch: MAIN
Changes since 1.103: +8 -3 lines
Diff to previous 1.103 (colored)

For originating router LSAs for P2P interfaces check for linkstate
instead of IF_STA_POINTTOPOINT. This makes "passive" work on P2P
interfaces. Also add the "depend on" logic.

Bug reported by stsp@
ok stsp@ benno@

Revision 1.103 / (download) - annotate - [select for diffs], Thu Sep 27 12:34:06 2018 UTC (5 years, 8 months ago) by benno
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.102: +2 -2 lines
Diff to previous 1.102 (colored)

whitepspace fix

Revision 1.102 / (download) - annotate - [select for diffs], Wed Aug 29 08:43:17 2018 UTC (5 years, 9 months ago) by remi
Branch: MAIN
Changes since 1.101: +13 -10 lines
Diff to previous 1.101 (colored)

Prevent ospfd from starting if another ospfd is already using the same
socket. The check on the control socket happens early so that the rc
scripts detect a failure.

OK claudio@ florian@

Revision 1.101 / (download) - annotate - [select for diffs], Mon Jun 25 22:16:53 2018 UTC (5 years, 11 months ago) by remi
Branch: MAIN
Changes since 1.100: +32 -3 lines
Diff to previous 1.100 (colored)

Add IMSG_IFADDRADD to ospfe and the master process.
This allows ospfd to recover automatically when an ip address gets
removed and re-added as it happens when the netstart script is executed
on a running system.

previous attempt discussed with friehm@ last year
input from sthen@ and jca@
OK jca@

Revision 1.100 / (download) - annotate - [select for diffs], Mon Feb 5 12:11:28 2018 UTC (6 years, 4 months ago) by remi
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3
Changes since 1.99: +29 -7 lines
Diff to previous 1.99 (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.99 / (download) - annotate - [select for diffs], Tue Jan 24 04:24:25 2017 UTC (7 years, 4 months ago) by benno
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.98: +8 -2 lines
Diff to previous 1.98 (colored)

sync log.c from relayd et al to ospfd.

there is still a little difference regarding handling of the verbosity
value that will be handled later.

ok claudio@

Revision 1.98 / (download) - annotate - [select for diffs], Wed Dec 21 10:30:11 2016 UTC (7 years, 5 months ago) by jca
Branch: MAIN
Changes since 1.97: +7 -0 lines
Diff to previous 1.97 (colored)

For IFINFO msgs, don't run the FSM if the interface state hasn't changed.

ok claudio@

Revision 1.97 / (download) - annotate - [select for diffs], Wed Dec 21 10:28:48 2016 UTC (7 years, 5 months ago) by jca
Branch: MAIN
Changes since 1.96: +2 -1 lines
Diff to previous 1.96 (colored)

When receiving an IFINFO message, also update the MTU of the interface

Helps recovering from MTU mismatches.  Prompted by a diff from Remi
Locherer, ok claudio@

Revision 1.96 / (download) - annotate - [select for diffs], Sat Sep 3 10:22:57 2016 UTC (7 years, 9 months ago) by renato
Branch: MAIN
Changes since 1.95: +11 -7 lines
Diff to previous 1.95 (colored)

Simplify shutdown process.

On shutdown, there's no need to use kill(2) to kill the child
processes. Just closing the IPC sockets will make the children receive
an EOF, break out from the event loop and then exit.

Tha advantages of this "pipe teardown" are:
* simpler code;
* no need to pledge "proc" in the parent process;
* removal of a (hard to trigger) PID reuse race condition.

ok benno@ claudio@

Revision 1.95 / (download) - annotate - [select for diffs], Fri Sep 2 14:02:48 2016 UTC (7 years, 9 months ago) by benno
Branch: MAIN
Changes since 1.94: +2 -1 lines
Diff to previous 1.94 (colored)

work on making log.c similar in all daemons:

move daemon-local functions into new logmsg.c, and reduce
the (mostly whitespace) differences so that log.c's can be diffed easily.

ok claudio@, feedback from henning@, deraadt@, reyk@

Revision 1.94 / (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_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.93: +7 -2 lines
Diff to previous 1.93 (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.93 / (download) - annotate - [select for diffs], Thu Dec 3 11:41:06 2015 UTC (8 years, 6 months ago) by claudio
Branch: MAIN
Changes since 1.92: +5 -5 lines
Diff to previous 1.92 (colored)

imsg_read will return EAGAIN in some cases so prep code for it.
This is in the way for ospfd pledge so in it goes. OK benno@

Revision 1.92 / (download) - annotate - [select for diffs], Sun Nov 22 13:09:10 2015 UTC (8 years, 6 months ago) by claudio
Branch: MAIN
Changes since 1.91: +2 -2 lines
Diff to previous 1.91 (colored)

Improve ABR support especially for self-originated stub networks.
This seems to solve the last issues people reported when using ospfd
in multiple areas. OK sthen@ prodding by deraadt@

Revision 1.91 / (download) - annotate - [select for diffs], Sun Sep 27 17:31:50 2015 UTC (8 years, 8 months ago) by stsp
Branch: MAIN
Changes since 1.90: +3 -3 lines
Diff to previous 1.90 (colored)

As done for bgpd recently, rename if_mediatype to if_type in ospfd/ospf6d.
And some ifmedia64 fixes.
"move forward" deraadt@

Revision 1.90 / (download) - annotate - [select for diffs], Tue Feb 10 05:24:48 2015 UTC (9 years, 4 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.89: +3 -2 lines
Diff to previous 1.89 (colored)

Convert ospfd over to SOCK_CLOEXEC | SOCK_NONBLOCK and make the route
socket non-blocking. Introduce the same trigger for partial rt msgs.

Revision 1.89 / (download) - annotate - [select for diffs], Tue Nov 18 20:54:29 2014 UTC (9 years, 6 months ago) by krw
Branch: MAIN
Changes since 1.88: +1 -2 lines
Diff to previous 1.88 (colored)

Nuke more obvious #include duplications.

ok deraadt@ millert@ tedu@

Revision 1.88 / (download) - annotate - [select for diffs], Sat Jul 12 20:16:38 2014 UTC (9 years, 10 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.87: +7 -3 lines
Diff to previous 1.87 (colored)

Close connections when msgbuf_write() returns 0.

ok claudio@

Revision 1.87 / (download) - annotate - [select for diffs], Wed Nov 13 20:43:00 2013 UTC (10 years, 6 months ago) by benno
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.86: +3 -3 lines
Diff to previous 1.86 (colored)

from claudio
"Let msgbuf_write return -1 with errno EAGAIN. The users then must
check if this was the case and readd the event or poll again.  The
current handling in the imsg code is wrong for sure."

ok gilles, benno

Revision 1.86 / (download) - annotate - [select for diffs], Fri Mar 22 08:42:55 2013 UTC (11 years, 2 months ago) by sthen
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.85: +7 -3 lines
Diff to previous 1.85 (colored)

reinstate code to announce routes to backup carp interfaces. this was removed
in a cleanup in r1.83, but we do still want to announce these (with a high
metric), so that a specific route to the relevant network is maintained
during failover.  ok florian@ claudio@

Revision 1.85 / (download) - annotate - [select for diffs], Thu Jan 17 10:07:56 2013 UTC (11 years, 4 months ago) by markus
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.84: +14 -2 lines
Diff to previous 1.84 (colored)

improve snapshot handling:
- don't start a new snapshot if we are already in NBR_STA_SNAP
- ignore IMSG_DB_SNAPSHOT and IMSG_DB_END unless we are in NBR_STA_SNAP
- add new IMSG_LS_SNAP message so we can distinguish it from
  IMSG_LS_UPD. this way we can ignore them if we are not in NBR_STA_SNAP
ok claudio@

Revision 1.84 / (download) - annotate - [select for diffs], Thu Jan 17 10:05:17 2013 UTC (11 years, 4 months ago) by markus
Branch: MAIN
Changes since 1.83: +2 -2 lines
Diff to previous 1.83 (colored)

do not send IMSG_LS_UPD if we have no links; ok claudio

Revision 1.83 / (download) - annotate - [select for diffs], Mon Jul 4 04:34:14 2011 UTC (12 years, 11 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.82: +4 -14 lines
Diff to previous 1.82 (colored)

LINK_STATE_IS_UP() cleanup userland part. There is no need to special
case carp(4) interfaces anymore. LINK_STATE_IS_UP() almost always does
the right job.
OK deraadt@ henning@

This needs a -current kernel or link state may be not reported correctly.

Revision 1.82 / (download) - annotate - [select for diffs], Mon May 9 12:24:41 2011 UTC (13 years, 1 month ago) by claudio
Branch: MAIN
Changes since 1.81: +10 -1 lines
Diff to previous 1.81 (colored)

First bits to support opaque LSA. Type-9, 10 and 11 are LSA that can
hold about any data you like and is used for things like greaceful
reload. Implement the basic redistribute logic and LSDB handling but
the data sent is currently not looked at.
Tested and OK sthen@

Revision 1.81 / (download) - annotate - [select for diffs], Mon May 2 09:22:23 2011 UTC (13 years, 1 month ago) by claudio
Branch: MAIN
Changes since 1.80: +12 -14 lines
Diff to previous 1.80 (colored)

Some KNF, some other cleanup, fix some fatalx() messages.
No functional change

Revision 1.80 / (download) - annotate - [select for diffs], Fri Mar 25 08:52:21 2011 UTC (13 years, 2 months ago) by claudio
Branch: MAIN
Changes since 1.79: +2 -2 lines
Diff to previous 1.79 (colored)

Rewrite the lsack generation. Make it more like the lsupdate code.
Removes some of the rather strange packet handling.
Tested by a few especially sthen@

Revision 1.79 / (download) - annotate - [select for diffs], Thu Mar 24 08:35:59 2011 UTC (13 years, 2 months ago) by claudio
Branch: MAIN
Changes since 1.78: +3 -1 lines
Diff to previous 1.78 (colored)

Fix some memory leaks. Mainly better cleanup on shutdown but the v_nexthop
leak is a runtime one.
OK bluhm@

Revision 1.78 / (download) - annotate - [select for diffs], Tue Mar 8 10:56:02 2011 UTC (13 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.77: +8 -6 lines
Diff to previous 1.77 (colored)

Instead of using IBUF_READ_SIZE as upper bound when building various
packets use a better upper bound based on IP_MAXPACKET. Also change
one IBUF_READ_SIZE to READ_BUF_SIZE since that is what the rest of
the code uses. Tested and OK sthen@

Revision 1.77 / (download) - annotate - [select for diffs], Fri Oct 1 13:29:25 2010 UTC (13 years, 8 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.76: +3 -3 lines
Diff to previous 1.76 (colored)

Reword a comment

Revision 1.76 / (download) - annotate - [select for diffs], Mon Jun 28 23:02:07 2010 UTC (13 years, 11 months ago) by bluhm
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.75: +2 -2 lines
Diff to previous 1.75 (colored)

Fix IFADDRDEL imsg error message.
ok claudio@

Revision 1.75 / (download) - annotate - [select for diffs], Wed May 26 13:56:08 2010 UTC (14 years ago) by nicm
Branch: MAIN
Changes since 1.74: +45 -45 lines
Diff to previous 1.74 (colored)

Rename some imsg bits to make namespace collisions less likely buf to
ibuf, buf_read to ibuf_read, READ_BUF_SIZE to IBUF_READ_SIZE.

ok henning gilles claudio jacekm deraadt

Revision 1.74 / (download) - annotate - [select for diffs], Tue Feb 16 18:27:11 2010 UTC (14 years, 3 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.73: +22 -1 lines
Diff to previous 1.73 (colored)

Pick up RTM_DELADDR and issue an internal IFADDRDEL message to the ospfe to
inform about the interface address change. If this is an active interface
it will be downed. A ospfctl reload is needed to fetch the new/changed IP
if one got set. OK dlg@, sthen@

Revision 1.73 / (download) - annotate - [select for diffs], Wed Sep 30 14:37:11 2009 UTC (14 years, 8 months ago) by claudio
Branch: MAIN
Changes since 1.72: +33 -7 lines
Diff to previous 1.72 (colored)

Announce a stub network LSA for backup carp interfaces. This should help
when fail-over happens, since removing the better route will not result
in a blackhole until the update from the new master is processed.
Tested, OK and input sthen@, phessler@

Revision 1.72 / (download) - annotate - [select for diffs], Wed Sep 30 14:30:24 2009 UTC (14 years, 8 months ago) by claudio
Branch: MAIN
Changes since 1.71: +5 -5 lines
Diff to previous 1.71 (colored)

0xffff -> MAX_METRIC. Idea by sthen@, I like it :)

Revision 1.71 / (download) - annotate - [select for diffs], Sat Sep 19 16:22:10 2009 UTC (14 years, 8 months ago) by sthen
Branch: MAIN
Changes since 1.70: +2 -2 lines
Diff to previous 1.70 (colored)

KNF indentation; no binary change

Revision 1.70 / (download) - annotate - [select for diffs], Sun Aug 9 23:04:16 2009 UTC (14 years, 10 months ago) by claudio
Branch: MAIN
Changes since 1.69: +2 -2 lines
Diff to previous 1.69 (colored)

Scale both receive and send buffer on the raw socket. The default 8192
bytes is not enough for larger networks causing send errors because of
too big packets. OK henning

Revision 1.69 / (download) - annotate - [select for diffs], Sat Jun 6 07:31:26 2009 UTC (15 years ago) by eric
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.68: +43 -35 lines
Diff to previous 1.68 (colored)

sync ospfctl/ospfd with the common imsg code, making it lib ready as well.

"looks ok" claudio@

Revision 1.68 / (download) - annotate - [select for diffs], Fri Jun 5 19:33:59 2009 UTC (15 years ago) by pyr
Branch: MAIN
Changes since 1.67: +12 -12 lines
Diff to previous 1.67 (colored)

make ospfd's imsg lib ready as well.
ok claudio@

Revision 1.67 / (download) - annotate - [select for diffs], Sun May 31 18:46:01 2009 UTC (15 years ago) by jacekm
Branch: MAIN
Changes since 1.66: +1 -3 lines
Diff to previous 1.66 (colored)

Remove redundant imsg_event_add calls; ok claudio@

Revision 1.66 / (download) - annotate - [select for diffs], Sun May 31 16:58:54 2009 UTC (15 years ago) by claudio
Branch: MAIN
Changes since 1.65: +7 -15 lines
Diff to previous 1.65 (colored)

The libevent callback function may be called with EV_READ and EV_WRITE
set at the same time so using a switch to do read or write is a bad idea.
Problem noticed by Eygene Ryabinkin on FreeBSD for some reasons it is not
triggered on OpenBSD.
Fix aggreed by a most other libevent hackers

Revision 1.65 / (download) - annotate - [select for diffs], Sun Apr 26 12:48:06 2009 UTC (15 years, 1 month ago) by sthen
Branch: MAIN
Changes since 1.64: +3 -3 lines
Diff to previous 1.64 (colored)

comment typos; no binary change

Revision 1.64 / (download) - annotate - [select for diffs], Tue Apr 7 14:57:33 2009 UTC (15 years, 2 months ago) by reyk
Branch: MAIN
Changes since 1.63: +2 -2 lines
Diff to previous 1.63 (colored)

allow to specify an alternate control socket instead of /var/run/ospfd.sock.
this is required to run multiple instances of ospfd.

ok claudio@

Revision 1.63 / (download) - annotate - [select for diffs], Wed Mar 4 12:51:01 2009 UTC (15 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.62: +7 -7 lines
Diff to previous 1.62 (colored)

Introduce and use buf_size(buf) instead of buf->wpos -- at least in the non
buf/imsg specific code. buf_close() will no force a truncation of the buffer
to the wpos but actually add code in imsg.c to detect and report such silly
behaviour. Makes the buf API a bit more sane.

Revision 1.62 / (download) - annotate - [select for diffs], Wed Jan 7 21:16:36 2009 UTC (15 years, 5 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_5_BASE, OPENBSD_4_5
Changes since 1.61: +8 -1 lines
Diff to previous 1.61 (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.61 / (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.60: +26 -1 lines
Diff to previous 1.60 (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.60 / (download) - annotate - [select for diffs], Sat Oct 13 13:21:24 2007 UTC (16 years, 8 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3
Changes since 1.59: +2 -2 lines
Diff to previous 1.59 (colored)

Funny typo, it is fib not fip so adjust function name.

Revision 1.59 / (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.58: +4 -4 lines
Diff to previous 1.58 (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.58 / (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.57: +3 -3 lines
Diff to previous 1.57 (colored)

fix alot of whitespace problems...

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

Don't fatal if the imsg pipe is closed, this is often triggered in the parent
and hides the real cause of the termination.
OK norby@, reyk@, pyr@

Revision 1.56 / (download) - annotate - [select for diffs], Tue Jun 19 14:42:09 2007 UTC (16 years, 11 months ago) by pyr
Branch: MAIN
Changes since 1.55: +2 -1 lines
Diff to previous 1.55 (colored)

Allow ospfd reconfiguration through SIGHUP, add SIGHUP handlers in
children like in bgpd so that ``pkill -1 ospfd'' works as expected.

ok claudio@

Revision 1.55 / (download) - annotate - [select for diffs], Tue May 29 22:08:25 2007 UTC (17 years ago) by claudio
Branch: MAIN
Changes since 1.54: +41 -1 lines
Diff to previous 1.54 (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.54 / (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.53: +55 -10 lines
Diff to previous 1.53 (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.53 / (download) - annotate - [select for diffs], Mon Feb 26 12:16:18 2007 UTC (17 years, 3 months ago) by norby
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.52: +2 -1 lines
Diff to previous 1.52 (colored)

Set the metric for loopback interfaces.

Fix by Dustin Lundquist - thank you very much.

ok henning@

Revision 1.52 / (download) - annotate - [select for diffs], Thu Feb 1 13:02:04 2007 UTC (17 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.51: +45 -2 lines
Diff to previous 1.51 (colored)

Preliminary configuration reload support. Seems to work reasonably well
after fixing many use-after-free errors a couple of days ago.
Most cases -- adding/removing of interfaces, adding/removing of areas --
seem to work. Still merge_config() is a behemoth of a function and some
edge cases may not be covered correctly (yet).
OK norby@ pyr@

Revision 1.51 / (download) - annotate - [select for diffs], Thu Jan 11 21:43:13 2007 UTC (17 years, 5 months ago) by claudio
Branch: MAIN
Changes since 1.50: +11 -19 lines
Diff to previous 1.50 (colored)

Silently ignore unknown neighbors in the rde and ospfe imsg handler. This
is needed for upcomming reload support -- it can happen that a message to
a just deleted neighbor is still pending.

Revision 1.50 / (download) - annotate - [select for diffs], Tue Nov 28 19:21:15 2006 UTC (17 years, 6 months ago) by reyk
Branch: MAIN
Changes since 1.49: +3 -3 lines
Diff to previous 1.49 (colored)

add additional link states to report the half duplex / full duplex
state, if known by the driver. this is required to check the full
duplex state without depending on the ifmedia ioctl which can't be
called in the kernel without process context.

ok henning@, brad@

Revision 1.49 / (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.48: +3 -8 lines
Diff to previous 1.48 (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.48 / (download) - annotate - [select for diffs], Wed Sep 27 14:37:38 2006 UTC (17 years, 8 months ago) by claudio
Branch: MAIN
Changes since 1.47: +3 -2 lines
Diff to previous 1.47 (colored)

Use IP_RECVIF to get the incomming interface of OSPF packets. Now we use
the source address and the interface index to find the corresponding
struct interface which is less error prone. OK norby@

Revision 1.47 / (download) - annotate - [select for diffs], Fri Jun 2 18:49:55 2006 UTC (18 years ago) by norby
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.46: +3 -3 lines
Diff to previous 1.46 (colored)

remove unused variable, found by lint.

Revision 1.46 / (download) - annotate - [select for diffs], Tue May 30 22:12:52 2006 UTC (18 years ago) by claudio
Branch: MAIN
Changes since 1.45: +9 -2 lines
Diff to previous 1.45 (colored)

Uups, this file should be commited with the redistribute rtlabel stuff.

Revision 1.45 / (download) - annotate - [select for diffs], Tue Apr 25 08:03:15 2006 UTC (18 years, 1 month ago) by claudio
Branch: MAIN
Changes since 1.44: +5 -5 lines
Diff to previous 1.44 (colored)

More lint cleanup. Kill unneeded stuff and sprinkle some ARGSUSED.

Revision 1.44 / (download) - annotate - [select for diffs], Sun Apr 16 11:40:55 2006 UTC (18 years, 1 month ago) by henning
Branch: MAIN
Changes since 1.43: +3 -2 lines
Diff to previous 1.43 (colored)

KNF

Revision 1.43 / (download) - annotate - [select for diffs], Thu Mar 9 09:03:22 2006 UTC (18 years, 3 months ago) by norby
Branch: MAIN
Changes since 1.42: +6 -1 lines
Diff to previous 1.42 (colored)

Log link state changes.

ok claudio@

Revision 1.42 / (download) - annotate - [select for diffs], Wed Mar 8 16:03:40 2006 UTC (18 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.41: +1 -2 lines
Diff to previous 1.41 (colored)

Remove unused quit flag inherited from bgpd long ago.

Revision 1.41 / (download) - annotate - [select for diffs], Wed Mar 8 13:23:08 2006 UTC (18 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.40: +12 -2 lines
Diff to previous 1.40 (colored)

Check for implied acks. If we receive an update that is on our retransmission
queue for the neighbor there is no need to send back an ack.

Revision 1.40 / (download) - annotate - [select for diffs], Tue Feb 21 13:02:59 2006 UTC (18 years, 3 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE, OPENBSD_3_9
Changes since 1.39: +2 -2 lines
Diff to previous 1.39 (colored)

Better English in comments.

Revision 1.39 / (download) - annotate - [select for diffs], Sun Feb 19 18:52:06 2006 UTC (18 years, 3 months ago) by norby
Branch: MAIN
Changes since 1.38: +6 -2 lines
Diff to previous 1.38 (colored)

Do not allocate a new chunk of memory every time we receive a packet.
This should have been fixed ages ago since it really improves the
performance of ospfd.

ok claudio@

Revision 1.38 / (download) - annotate - [select for diffs], Fri Feb 10 18:30:47 2006 UTC (18 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.37: +9 -9 lines
Diff to previous 1.37 (colored)

ospfd does not need fd passing via the imsg framework so remove that code
and remove other unneeded functions that are only used in bgpd.

Revision 1.37 / (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.36: +26 -18 lines
Diff to previous 1.36 (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.36 / (download) - annotate - [select for diffs], Thu Dec 29 13:53:36 2005 UTC (18 years, 5 months ago) by claudio
Branch: MAIN
Changes since 1.35: +7 -8 lines
Diff to previous 1.35 (colored)

Instead of a simple timer per neighbor for the LS retransmition list use
a timewheel. All LSA updates are now first added to the queue and sent out
later. This makes it possible to cluster multiple LSA updates into on OSPF
packet. This gives a massive speedup when large databases need to be synced.
Tested and OK norby@

Revision 1.35 / (download) - annotate - [select for diffs], Thu Dec 15 20:30:44 2005 UTC (18 years, 5 months ago) by claudio
Branch: MAIN
Changes since 1.34: +4 -2 lines
Diff to previous 1.34 (colored)

Fix ospfe shutdown function. The cleanup was totaly busted. OK norby@

Revision 1.34 / (download) - annotate - [select for diffs], Sun Dec 4 20:49:47 2005 UTC (18 years, 6 months ago) by norby
Branch: MAIN
Changes since 1.33: +3 -1 lines
Diff to previous 1.33 (colored)

Increase the receive buffer of the raw socket.

Prevents some of the retransmitting during bulk ls update transfers.

ok claudio@

Revision 1.33 / (download) - annotate - [select for diffs], Wed Oct 19 21:43:20 2005 UTC (18 years, 7 months ago) by claudio
Branch: MAIN
Changes since 1.32: +2 -2 lines
Diff to previous 1.32 (colored)

fix some spellings in comments.

Revision 1.32 / (download) - annotate - [select for diffs], Tue Oct 18 15:40:36 2005 UTC (18 years, 7 months ago) by claudio
Branch: MAIN
Changes since 1.31: +3 -1 lines
Diff to previous 1.31 (colored)

Cleanup interface code a minimal bit. There is no need for if_shutdown(),
especially it got called in the wrong place.  OK norby@

Revision 1.31 / (download) - annotate - [select for diffs], Mon Jun 13 08:27:29 2005 UTC (19 years ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.30: +1 -6 lines
Diff to previous 1.30 (colored)

Passive interfaces belong to the area and should be announced as stub
networks. Bug report and testing by Stephen Marley.
While there kill an unneeded log_debug().
OK norby@

Revision 1.30 / (download) - annotate - [select for diffs], Fri May 27 08:41:25 2005 UTC (19 years ago) by norby
Branch: MAIN
Changes since 1.29: +5 -2 lines
Diff to previous 1.29 (colored)

Set the V-bit when originating virtual links in router LSAs.

ok claudio@

Revision 1.29 / (download) - annotate - [select for diffs], Fri May 27 07:58:46 2005 UTC (19 years ago) by norby
Branch: MAIN
Changes since 1.28: +19 -3 lines
Diff to previous 1.28 (colored)

Virtual link support, originate virtual links in router LSAs.

jajaja claudio@

Revision 1.28 / (download) - annotate - [select for diffs], Fri May 27 04:48:48 2005 UTC (19 years ago) by claudio
Branch: MAIN
Changes since 1.27: +2 -2 lines
Diff to previous 1.27 (colored)

Fix a access after free on shutdown. OK norby@

Revision 1.27 / (download) - annotate - [select for diffs], Fri May 27 02:37:39 2005 UTC (19 years ago) by norby
Branch: MAIN
Changes since 1.26: +49 -5 lines
Diff to previous 1.26 (colored)

Initial virtual link support.

ok claudio@

Revision 1.26 / (download) - annotate - [select for diffs], Thu May 26 22:55:56 2005 UTC (19 years ago) by norby
Branch: MAIN
Changes since 1.25: +3 -3 lines
Diff to previous 1.25 (colored)

More usable debug output when originating router lsas.

Revision 1.25 / (download) - annotate - [select for diffs], Thu May 26 22:45:00 2005 UTC (19 years ago) by norby
Branch: MAIN
Changes since 1.24: +1 -5 lines
Diff to previous 1.24 (colored)

Another unneeded debug message.

Revision 1.24 / (download) - annotate - [select for diffs], Thu May 26 22:06:26 2005 UTC (19 years ago) by norby
Branch: MAIN
Changes since 1.23: +1 -27 lines
Diff to previous 1.23 (colored)

Remove unneeded debugging messages from ospfe imsg handling.

Revision 1.23 / (download) - annotate - [select for diffs], Thu May 26 19:54:49 2005 UTC (19 years ago) by norby
Branch: MAIN
Changes since 1.22: +13 -9 lines
Diff to previous 1.22 (colored)

Simplify and cleanup passive interface handling.

ok claudio@

Revision 1.22 / (download) - annotate - [select for diffs], Thu May 26 18:46:16 2005 UTC (19 years ago) by norby
Branch: MAIN
Changes since 1.21: +2 -2 lines
Diff to previous 1.21 (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.21 / (download) - annotate - [select for diffs], Mon May 23 22:54:05 2005 UTC (19 years ago) by henning
Branch: MAIN
Changes since 1.20: +1 -3 lines
Diff to previous 1.20 (colored)

useless use of endpwent

Revision 1.20 / (download) - annotate - [select for diffs], Thu May 12 19:10:12 2005 UTC (19 years, 1 month ago) by norby
Branch: MAIN
Changes since 1.19: +7 -1 lines
Diff to previous 1.19 (colored)

Add "show database asbr/external/network/router/self-originate/summary"
to ospfctl.

Show detailed information about the LSAs in the Link State Database.

ok claudio@

Revision 1.19 / (download) - annotate - [select for diffs], Thu May 12 08:55:39 2005 UTC (19 years, 1 month ago) by claudio
Branch: MAIN
Changes since 1.18: +28 -2 lines
Diff to previous 1.18 (colored)

If activly connected to more than one area set B flag in the self-originated
router LSA. To do that correctly we need to track the number of active
neighbors for each area. If the routers ABR status changes all router LSA
need to be updated via orig_rtr_lsa_all().
OK norby@

Revision 1.18 / (download) - annotate - [select for diffs], Mon May 2 02:26:35 2005 UTC (19 years, 1 month ago) by djm
Branch: MAIN
Changes since 1.17: +3 -4 lines
Diff to previous 1.17 (colored)

use setres[ug]id for privilege dropping; ok norby@

Revision 1.17 / (download) - annotate - [select for diffs], Mon Apr 25 11:31:50 2005 UTC (19 years, 1 month ago) by claudio
Branch: MAIN
Changes since 1.16: +2 -4 lines
Diff to previous 1.16 (colored)

Call if_init() later and for each interface separately.
Move code from if_act_start() to if_init() that needs to be called only
once per interface. Especially event_set should be called only once as it
initializes struct event and so may cause corruption of the event queue if
called twice.

Revision 1.16 / (download) - annotate - [select for diffs], Mon Apr 25 09:55:18 2005 UTC (19 years, 1 month ago) by claudio
Branch: MAIN
Changes since 1.15: +17 -1 lines
Diff to previous 1.15 (colored)

Move the creation of the ospf_socket from if_init() directly into ospfe().
This makes it possible to call if_init() at a much later time.

Revision 1.15 / (download) - annotate - [select for diffs], Mon Apr 25 09:28:45 2005 UTC (19 years, 1 month ago) by claudio
Branch: MAIN
Changes since 1.14: +4 -1 lines
Diff to previous 1.14 (colored)

Call if_init() in ospfe only, neither the rde nor the parent need it.

Revision 1.14 / (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.13: +21 -7 lines
Diff to previous 1.13 (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.13 / (download) - annotate - [select for diffs], Tue Mar 15 22:03:56 2005 UTC (19 years, 2 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_7
Changes since 1.12: +4 -2 lines
Diff to previous 1.12 (colored)

Add control messages for the show fib commands.
OK norby@ deraadt@

Revision 1.12 / (download) - annotate - [select for diffs], Mon Mar 14 18:21:29 2005 UTC (19 years, 2 months ago) by norby
Branch: MAIN
Changes since 1.11: +5 -3 lines
Diff to previous 1.11 (colored)

Add "show summary" to ospfctl.

ok claudio@ henning@

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

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

ok henning@

Revision 1.10 / (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.9: +5 -3 lines
Diff to previous 1.9 (colored)

Small K&F.

ok henning@

Revision 1.9 / (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.8: +7 -6 lines
Diff to previous 1.8 (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.8 / (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.7: +5 -5 lines
Diff to previous 1.7 (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.7 / (download) - annotate - [select for diffs], Sat Feb 19 10:19:56 2005 UTC (19 years, 3 months ago) by norby
Branch: MAIN
Changes since 1.6: +2 -2 lines
Diff to previous 1.6 (colored)

Originate P2P links correctly.

ok claudio@

Revision 1.6 / (download) - annotate - [select for diffs], Thu Feb 10 14:05:48 2005 UTC (19 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.5: +15 -1 lines
Diff to previous 1.5 (colored)

Work around a timing issue in the db exchange phase. The DB description
packets comming from the net are looped through the RDE and may get
delayed because of this. The result is that the neighbor FSM ends in
state FULL instead of LOADING and so the LSDB is not correctly
synchronized. Issue found by norby@ OK norby@

Revision 1.5 / (download) - annotate - [select for diffs], Wed Feb 9 20:40:23 2005 UTC (19 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.4: +198 -107 lines
Diff to previous 1.4 (colored)

Rework of self originated LSA. First of all the code to generate the LSA
is rewritten to use the dynamic buffer api introduced lately.
Add missing parts in the RDE to merge these LSA originated from the OE into
the LSDB with correct seq_num, etc.
Add hooks to the neighbor and interface fsm so that the LSA get updated if
needed. This is not perfect, still many things are missing. OK norby@

Revision 1.4 / (download) - annotate - [select for diffs], Mon Feb 7 05:51:00 2005 UTC (19 years, 4 months ago) by david
Branch: MAIN
Changes since 1.3: +3 -3 lines
Diff to previous 1.3 (colored)

spelling fixes

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

KNF

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.