OpenBSD CVS

CVS log for src/usr.sbin/ospf6d/rde_spf.c


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.29 / (download) - annotate - [select for diffs], Wed Mar 8 04:43:14 2023 UTC (14 months, 3 weeks ago) by guenther
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, HEAD
Changes since 1.28: +1 -2 lines
Diff to previous 1.28 (colored)

Delete obsolete /* ARGSUSED */ lint comments.

ok miod@ millert@

Revision 1.28 / (download) - annotate - [select for diffs], Sun Apr 5 18:19:04 2020 UTC (4 years, 1 month ago) by denis
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, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.27: +15 -10 lines
Diff to previous 1.27 (colored)

Handle connected routes as ospfd(8) does.

OK remi@

Revision 1.27 / (download) - annotate - [select for diffs], Sun Mar 29 11:59:11 2020 UTC (4 years, 2 months ago) by denis
Branch: MAIN
Changes since 1.26: +28 -22 lines
Diff to previous 1.26 (colored)

Rework of rde_asext_get()/rde_asext_put().
Also change get_net_link() and get_rtr_link() to work like ospfd(8)
couterpart.

OK remi@

Revision 1.26 / (download) - annotate - [select for diffs], Sun Dec 22 11:19:07 2019 UTC (4 years, 5 months ago) by denis
Branch: MAIN
Changes since 1.25: +13 -45 lines
Diff to previous 1.25 (colored)

Rename and move calc_nexthop_clear()/calc_nexthop_add()

OK claudio@

Revision 1.25 / (download) - annotate - [select for diffs], Sat Dec 5 06:45:19 2015 UTC (8 years, 5 months ago) by mmcc
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.24: +2 -2 lines
Diff to previous 1.24 (colored)

strings.h -> string.h to prevent an implicit declaration warning.

Revision 1.24 / (download) - annotate - [select for diffs], Tue Sep 18 18:58:57 2012 UTC (11 years, 8 months ago) by bluhm
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7, OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5, OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.23: +1 -4 lines
Diff to previous 1.23 (colored)

The if (!better && !equal) check is redundant as the same condition
is checked a few lines below again.  Fewer checks make the code
more readable.
ok stsp@

Revision 1.23 / (download) - annotate - [select for diffs], Thu Jul 1 19:47:04 2010 UTC (13 years, 11 months ago) by bluhm
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, OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.22: +4 -4 lines
Diff to previous 1.22 (colored)

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

Revision 1.22 / (download) - annotate - [select for diffs], Mon Mar 1 08:51:40 2010 UTC (14 years, 3 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.21: +127 -40 lines
Diff to previous 1.21 (colored)

Add routing calculation code for AS-ext LSA and Inter-Area LSA but the
latter are not realy tested. AS-ext LSA are now correctly added to the
RIB.  "looks like you know what you're doing" stsp@

Revision 1.21 / (download) - annotate - [select for diffs], Mon Feb 22 08:03:06 2010 UTC (14 years, 3 months ago) by stsp
Branch: MAIN
Changes since 1.20: +23 -14 lines
Diff to previous 1.20 (colored)

Treat multiple Router-LSAs originated by the same router as an
aggregate, as mandated by RFC5340.

OK claudio@

Revision 1.20 / (download) - annotate - [select for diffs], Tue Dec 22 19:47:05 2009 UTC (14 years, 5 months ago) by claudio
Branch: MAIN
Changes since 1.19: +0 -3 lines
Diff to previous 1.19 (colored)

Crap. Remove debug code that I did not plan to commit.

Revision 1.19 / (download) - annotate - [select for diffs], Tue Dec 22 19:44:52 2009 UTC (14 years, 5 months ago) by claudio
Branch: MAIN
Changes since 1.18: +4 -1 lines
Diff to previous 1.18 (colored)

Holy inconsitancy Batman! While it is impossible to use embeded scope ids
in almost all sockaddr_in6 addresses it is required for the nexthop and
sin6_scope_id is actually ignored there.
This needs to be fixed but my quota of IPv6 insanity is already used for today.
Workaround for now. My simple testsetup is now actually able to install
the first ospf6d learned routes in the kernel. Weeee!

Revision 1.18 / (download) - annotate - [select for diffs], Tue Dec 22 17:54:04 2009 UTC (14 years, 5 months ago) by claudio
Branch: MAIN
Changes since 1.17: +8 -13 lines
Diff to previous 1.17 (colored)

Link local addressing strikes again. Include ifindex in all nexthop
definitions so that we have a chance to build a correct nexthop.
Insane that a struct in6_addr is unable to fully specify an IPv6 address.
kroute.c still needs fixing but now the rib is starting to make sense.

Revision 1.17 / (download) - annotate - [select for diffs], Tue Dec 22 17:42:46 2009 UTC (14 years, 5 months ago) by claudio
Branch: MAIN
Changes since 1.16: +2 -2 lines
Diff to previous 1.16 (colored)

Use correct interface id. iface_id is our ifindex, nbr_iface_id is the
interface id of the remote side. Found the hard way.

Revision 1.16 / (download) - annotate - [select for diffs], Tue Dec 22 16:29:55 2009 UTC (14 years, 5 months ago) by claudio
Branch: MAIN
Changes since 1.15: +16 -12 lines
Diff to previous 1.15 (colored)

Give calc_nexthop_lladdr() a chance to find the correct link local address.
We need to pass our ifindex so that we can find the Link-LSA that has the
link local address stored for that router.  Don't we all like IPv6 link local
addresses and their insanity.

Revision 1.15 / (download) - annotate - [select for diffs], Tue Jul 28 19:20:40 2009 UTC (14 years, 10 months ago) by claudio
Branch: MAIN
Changes since 1.14: +9 -2 lines
Diff to previous 1.14 (colored)

Install interface addresses of other routers (LA bit set or 128 prefixlen)
as router type and not as a network.
From stsp@

Revision 1.14 / (download) - annotate - [select for diffs], Thu Apr 9 19:06:52 2009 UTC (15 years, 1 month ago) by stsp
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.13: +61 -81 lines
Diff to previous 1.13 (colored)

Update rt_calc() for OSPFv3. The Routing Information Base is being
populated. Intra-area routes only for now.

"I see no obvious issues. Should go in so you can move forward" claudio@

Revision 1.13 / (download) - annotate - [select for diffs], Sun Mar 29 21:48:35 2009 UTC (15 years, 2 months ago) by stsp
Branch: MAIN
Changes since 1.12: +51 -24 lines
Diff to previous 1.12 (colored)

Update spf_calc() for OSPFv3.

This implements the first stage of the shortest path tree calculation
(Dijkstra calculation) as outlined in rfc5340, with the exception that
we do not yet treat multiple router LSAs originated by a single router
as an agregate. For now, we only use the Router LSA with the lowest link
state ID.

For each destination, show the calculated set of nexthops in the debug log.
We can stop doing this once spf tree calculation has been shown to be stable.

"A lot of debug code but yes why not. commit it." claudio@

Revision 1.12 / (download) - annotate - [select for diffs], Sun Mar 29 21:46:10 2009 UTC (15 years, 2 months ago) by stsp
Branch: MAIN
Changes since 1.11: +32 -58 lines
Diff to previous 1.11 (colored)

Update calc_nexthop() for OSPFv3, using helper functions added in
last commit. Next hop IP addresses and outgoing interfaces can now
be correctly determined, paving the way for SPF tree calculation.
Arguments have changed, so update callers, too.

ok claudio@

Revision 1.11 / (download) - annotate - [select for diffs], Sun Mar 29 21:42:30 2009 UTC (15 years, 2 months ago) by stsp
Branch: MAIN
Changes since 1.10: +69 -8 lines
Diff to previous 1.10 (colored)

As a first step towards SPF tree calculation, prepare for proper
next-hop calculation.

In OSPFv3, next-hop IP addresses are always link-local.
The kernel will want to know which interface the link-local
address belongs to, so we need an ifindex in struct v_nexthop
in addition to the IP address.

Because we cannot determine a link-local next hop IP address
for transit networks, only the outgoing interface will be recorded.

Update calc_nexthop_add() according to the above.

Also add new helpers calc_nexthop_lladdr() and calc_nexthop_transit_nbr(),
to figure out link-local addresses of nexthop neighbours.

ok claudio@

Revision 1.10 / (download) - annotate - [select for diffs], Sun Mar 29 19:34:23 2009 UTC (15 years, 2 months ago) by stsp
Branch: MAIN
Changes since 1.9: +7 -9 lines
Diff to previous 1.9 (colored)

Update linked() for OSPFv3.

A router vertex w has a point-to-point link back to a router
vertex v if v's router ID occurs as neighbour ID in one of the
point-to-point links described in w's router LSA.

A router vertex w has a link back to a network vertex v if the router
ID of v's advertising router (i.e. DR) occurs as neighbour ID in one
of the transit links described in w's router LSA, and v's interface
ID to the network matches the neighbour interface ID of that transit
link.

A network vertex w has a link back to a router vertex v if v's router
ID occurs in the list of attached routers in w's network LSA.

Also, get_rtr_link() and get_net_link() take an unsigned int now.

"commit it" claudio@

Revision 1.9 / (download) - annotate - [select for diffs], Sun Mar 29 19:28:10 2009 UTC (15 years, 2 months ago) by stsp
Branch: MAIN
Changes since 1.8: +8 -11 lines
Diff to previous 1.8 (colored)

Change get_net_link()'s idx argument to unsigned, and make it
use less local variables. Makes it consistent with get_rtr_link().

ok claudio@

Revision 1.8 / (download) - annotate - [select for diffs], Sun Mar 29 19:25:49 2009 UTC (15 years, 2 months ago) by stsp
Branch: MAIN
Changes since 1.7: +9 -10 lines
Diff to previous 1.7 (colored)

Because get_rtr_link() forgot to increment the buffer offset
it was always returning the first link in the LSA, no matter
which link was requested. Fix this bug. Also, decrease the
number of local variables while here, and convert the idx argument
to unsigned int. Adjust one caller to pass an unsigned int,
other callers will be handled in follow-up commits.

ok claudio@

Revision 1.7 / (download) - annotate - [select for diffs], Tue Mar 10 17:37:45 2009 UTC (15 years, 2 months ago) by stsp
Branch: MAIN
Changes since 1.6: +4 -4 lines
Diff to previous 1.6 (colored)

The linked() function had an identity crisis and referred to itself
as "spf_calc" in fatal error messages.

Revision 1.6 / (download) - annotate - [select for diffs], Mon Feb 11 13:48:39 2008 UTC (16 years, 3 months ago) by norby
Branch: MAIN
CVS Tags: OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3
Changes since 1.5: +2 -2 lines
Diff to previous 1.5 (colored)

Correct the output of several error and debug messages.

Revision 1.5 / (download) - annotate - [select for diffs], Tue Nov 27 12:23:06 2007 UTC (16 years, 6 months ago) by claudio
Branch: MAIN
Changes since 1.4: +5 -3 lines
Diff to previous 1.4 (colored)

Make lsa_find() find link local LSA by passing the interface instead of the
area as lookup point. Additionally make lsa_dump or actually the code around
it pass all LSA to ospf6ctl. The rde_spf.c are not final.

Revision 1.4 / (download) - annotate - [select for diffs], Tue Oct 16 21:36:19 2007 UTC (16 years, 7 months ago) by claudio
Branch: MAIN
Changes since 1.3: +1 -10 lines
Diff to previous 1.3 (colored)

Oups, unbreak there were some LINK_TYPE_STUB_NET left in the code.

Revision 1.3 / (download) - annotate - [select for diffs], Tue Oct 16 13:01:07 2007 UTC (16 years, 7 months ago) by norby
Branch: MAIN
Changes since 1.2: +11 -4 lines
Diff to previous 1.2 (colored)

Make ospf6d(8) not throw up on Router LSAs.

Initial step towards actually storing real LSAs.

ok claudio@

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

First step at making kroute IPv6 aware. This resulted in many additional
changes -- some are so hairy that I left them out for later by commenting out
larger blocks of code (just grep for XXX if you like to help).
Get it in early so that we can work on.
OK norby@

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

Welcome ospf6d

The new ospf6d daemon will support OSPFv3, basically OSPF for IPv6 networks.

It is heavily based on ospfd(8), it is more or less a copy and paste of it.
Currently some unneeded stuff has been removed and the trasition from
IPv4 to IPv6 has begun.

ospf6d is not very usefull at the moment, it is being imported to allow more
people to work on it concurrently.

Not yet connected to the builds.

ok claudio@ dlg@

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