OpenBSD CVS

CVS log for src/usr.sbin/bgpd/rde_decide.c


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.102 / (download) - annotate - [select for diffs], Thu Oct 12 14:22:08 2023 UTC (7 months, 3 weeks ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, HEAD
Changes since 1.101: +13 -6 lines
Diff to previous 1.101 (colored)

Before calling rde_generate_updates() with EVAL_ALL ensure that the new
path is actually eligible. If this is not the case pass NULL instead.
This is an optimisation to bypass extra work if both old and new path
were ineligible.
OK tb@

Revision 1.101 / (download) - annotate - [select for diffs], Mon Mar 13 16:52:42 2023 UTC (14 months, 3 weeks ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3
Changes since 1.100: +2 -2 lines
Diff to previous 1.100 (colored)

Add F_CTL_LEAKED and F_CTL_INELIGIBLE flags for bgpctl to show leaked
and ineligible paths.
While there rename F_PREF_OTC_LOOP to F_PREF_OTC_LEAK since this indicates
that a route leak was detected.
OK tb@

Revision 1.100 / (download) - annotate - [select for diffs], Thu Mar 9 13:12:19 2023 UTC (15 months ago) by claudio
Branch: MAIN
Changes since 1.99: +3 -2 lines
Diff to previous 1.99 (colored)

Major rework of RFC9234 support. My initial interpretation of the RFC was
too conservative. Fixes and changes include:

- add role output to bgpctl, also adjust the capability output.
  Note, this changes the JSON output of neighbors a bit.
- adjust the config parser to enable the RFC9234 role capability when
  there is a role set. iBGP and sessions with no role will not announce
  the role capability.
- adjust the role capability announcement to be only on sessions that
  use either AFI IPv4 or IPv6 and SAFI 1 (AID_INET, AID_INET6).
- if there is an OPEN notification indicating that the role capability
  is bad only disable the capability if it is not enforced.
- Adjust capability negotiation, store remote_role on the peer since
  the neighbors role is no longer needed by the RDE.
- inject the OTC attribute on ingress only for AID_INET and AID_INET6.
  For other AIDs clear the F_ATTR_OTC_LOOP flag.
- Adjust the role logic in the RDE and use the peer->role (local role of
  the system) for all checks. Also remove the check if the role capability
  was negotiated between peers.
- In prefix_eligible() check also if the F_ATTR_OTC_LOOP flag is set.
  The RFC requires that prefixes must be considered ineligible (and not
  treat as withdraw as done before)
- When generating an UPDATE include the OTC attribute unless the AID is
  neither AID_INET or AID_INET6.

Fixes https://github.com/openbgpd-portable/openbgpd-portable/issues/51
Reported by Pier Carlo Chiodi
OK tb@

Revision 1.99 / (download) - annotate - [select for diffs], Mon Feb 13 18:07:53 2023 UTC (15 months, 3 weeks ago) by claudio
Branch: MAIN
Changes since 1.98: +5 -7 lines
Diff to previous 1.98 (colored)

Pass struct rib_entry to rde_generate_updates() instead of struct rib.
With this the newbest and oldbest arguments can go since the infromation
is part of the rib_entry. Especially the prefix in the rib_entry is
always valid so simplify some code in various functions below to use
this information.
OK tb@

Revision 1.98 / (download) - annotate - [select for diffs], Fri Sep 23 15:49:20 2022 UTC (20 months, 2 weeks ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2
Changes since 1.97: +7 -5 lines
Diff to previous 1.97 (colored)

Implement a special update generator for add-path send all.

The generic add-path code up_generate_addpath() reevaluates everything
since this is the simplest way to select the announced paths. For add-path
all this is overkill since there is no dependency between prefixes and so
individual prefixes can be handled more efficently.

Extend rde_generate_updates() to pass the current newbest and oldbest
prefixes (for the selected best path) but now also include newpath and
oldpath (which is the prefix that is added/removed/modified).
If newpath or oldpath is set then a single prefix was altered and
up_generate_addpath_all() can just remove or add this prefix.
If newpath and oldpath are NULL than the full list based on newbest
needs to be inserted and any old path/prefix removed in the process.

This improves update generation performance on big route collectors using
add-path all substantially.

OK tb@

Revision 1.91.2.1 / (download) - annotate - [select for diffs], Mon Aug 1 11:02:16 2022 UTC (22 months, 1 week ago) by tb
Branch: OPENBSD_7_1
Changes since 1.91: +80 -35 lines
Diff to previous 1.91 (colored) next main 1.92 (colored)

Properly handle nexthop state changes in the decision process

In rev 1.90 of rde_decide.c the re->active cache of the best prefix was
replaced with a call to prefix_best(). This introduced a bug because the
nexthop state at that time may have changed already. As a result when
a nexthop became unreachable prefix_evaluate() had oldbest = NULL and
newbest = NULL and did not withdraw the prefix from FIB and Adj-RIB-Out.

To fix this store the nexthop state per prefix and introduce
prefix_evaluate_nexthop() which removes the prefix from the decision list,
updates the nexthop state of the prefix and reinserts the prefix. Doing
this ensures that prefix_best() always reports the same result once the
decison process is done. prefix_best() and prefix_eligible() only depend
on data stored on the prefix itself.

from claudio, backport tb

this is patches/7.1/common/008_bgpd.patch.sig

Revision 1.97 / (download) - annotate - [select for diffs], Mon Jul 25 16:37:55 2022 UTC (22 months, 2 weeks ago) by claudio
Branch: MAIN
Changes since 1.96: +79 -34 lines
Diff to previous 1.96 (colored)

Properly handle nexthop state changes in the decision process

In rev 1.90 of rde_decide.c the re->active cache of the best prefix was
replaced with a call to prefix_best(). This introduced a bug because the
nexthop state at that time may have changed already. As a result when
a nexthop became unreachable prefix_evaluate() had oldbest = NULL and
newbest = NULL and did not withdraw the prefix from FIB and Adj-RIB-Out.

To fix this store the nexthop state per prefix and introduce
prefix_evaluate_nexthop() which removes the prefix from the decision list,
updates the nexthop state of the prefix and reinserts the prefix. Doing
this ensures that prefix_best() always reports the same result once the
decison process is done. prefix_best() and prefix_eligible() only depend
on data stored on the prefix itself.

OK tb@

Revision 1.96 / (download) - annotate - [select for diffs], Mon Jul 18 09:42:46 2022 UTC (22 months, 3 weeks ago) by claudio
Branch: MAIN
Changes since 1.95: +7 -3 lines
Diff to previous 1.95 (colored)

Do not fatalx() when calculating the dmetric and the result is negative.

The list of invalid prefixes is not properly sorted and when those prefixes
all become valid the list is not properly sorted until the nexthop update
pass is done. Found the hard way by myself.
OK tb@ benno@

Revision 1.95 / (download) - annotate - [select for diffs], Mon Jul 11 16:46:41 2022 UTC (22 months, 4 weeks ago) by claudio
Branch: MAIN
Changes since 1.94: +12 -13 lines
Diff to previous 1.94 (colored)

Use newbest and oldbest instead of xp and active as variable names
for the best prefix before and after the decision process.
OK tb@

Revision 1.94 / (download) - annotate - [select for diffs], Thu Jul 7 19:46:38 2022 UTC (23 months ago) by claudio
Branch: MAIN
Changes since 1.93: +46 -21 lines
Diff to previous 1.93 (colored)

Rework prefix_insert() and prefix_remove() to properly recalculate dmetric

The med regress test triggered the fatal in prefix_set_dmetric() because
on MED priority inversion the simple check previous with next before remove
can return a negative number because that prefix is also inversed.

Adjust code so that when removing prefixes from the list wait until the
next element is checked to do the fixup. In prefix_remove() cache the
previous element and calculate the dmetric at the end of the MED check.
In prefix_insert() alter the loop to also defer the dmetric recalc by
removing most continue statements in the loop.
With and OK tb@

Revision 1.93 / (download) - annotate - [select for diffs], Thu Jul 7 12:16:04 2022 UTC (23 months ago) by claudio
Branch: MAIN
Changes since 1.92: +97 -37 lines
Diff to previous 1.92 (colored)

Introduce a decision metric (dmetric) that classifies the relation of
this prefix with respect to its previous one.

Currently the plan is to distinguish the best prefix (only one), ecmp
prefixes (currently the same as as-wide-multipath), as-wide-multipath
prefixes, valid prefixes and invalid prefixes.
This information will be used to implement add-path send but also for
ecmp support in bgpd.
OK tb@

Revision 1.92 / (download) - annotate - [select for diffs], Thu Jul 7 10:46:54 2022 UTC (23 months ago) by claudio
Branch: MAIN
Changes since 1.91: +4 -3 lines
Diff to previous 1.91 (colored)

Refactor the code that generates updates so that up_generate_updates is
only called in one spot.

rde_generate_updates() gets a enum eval_mode argument to discern
the different cases. peer_generate_update() uses the eval_mode to skip
the update if it is not needed.
While there also add an extra AID check in IMSG_REFRESH case to make sure
the requested AID is actually available for this peer.
OK tb@

Revision 1.91 / (download) - annotate - [select for diffs], Tue Mar 22 10:53:08 2022 UTC (2 years, 2 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_1_BASE
Branch point for: OPENBSD_7_1
Changes since 1.90: +26 -38 lines
Diff to previous 1.90 (colored)

Switch from a LIST to TAILQ for the structure to store prefixes on a
rib_entry. Mostly mechanical, this simplifies prefix_insert() and
prefix_remove() since the redo queue can now just use TAILQ_INSERT_TAIL().
rde_softreconfig_sync_reeval() needs to use TAILQ_CONCAT() to move
the list of prefixes over to the local TAILQ_HEAD to reapply them later.
OK tb@

Revision 1.90 / (download) - annotate - [select for diffs], Mon Mar 21 17:35:56 2022 UTC (2 years, 2 months ago) by claudio
Branch: MAIN
Changes since 1.89: +25 -17 lines
Diff to previous 1.89 (colored)

Remove the active prefix cache in struct rib_entry. I need the space
and it also makes less sense to track this with ECMP or add-path.
Replace the re->active access with prefix_best(re) which does the
check on the spot.
Feedback and OK tb@

Revision 1.89 / (download) - annotate - [select for diffs], Thu Mar 3 13:06:15 2022 UTC (2 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.88: +9 -5 lines
Diff to previous 1.88 (colored)

Move rde_send_kroute() from rde_generate_updates() to prefix_evaluate().
rde_generate_updates() should only handle RIB updates and the logic
for rde_send_kroute() may change in the future.
Refactor code to simplify it a bit and make it clear that to delete a
prefix from the FIB only the prefix/len is needed.
OK tb@

Revision 1.88 / (download) - annotate - [select for diffs], Tue Mar 1 09:46:22 2022 UTC (2 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.87: +10 -7 lines
Diff to previous 1.87 (colored)

Rewrite some comments to hopefully be easier to understand.
No code change.

Revision 1.87 / (download) - annotate - [select for diffs], Sun Feb 6 09:51:19 2022 UTC (2 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.86: +4 -4 lines
Diff to previous 1.86 (colored)

Switch from u_intX_t types to stdint.h uintX_t. Mostly mechanical with
a few reindents.
OK florian@ tb@

Revision 1.86 / (download) - annotate - [select for diffs], Mon Aug 9 08:15:34 2021 UTC (2 years, 10 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0
Changes since 1.85: +8 -1 lines
Diff to previous 1.85 (colored)

Implement reception of multiple paths per BGP session. This is one
side of RFC7911 and the send portion will follow.

The path-id is extracted from the NLRI encoding an put into struct
prefix.  To do this the prefix_by_peer() function gets a path-id
argument.  If a session is not path-id enabled this argument will
be always 0. If a session is path-id enabled the value is taken
from the NLRI and can be anything, including 0. The value has no
meaning in itself. Still to make sure the decision process is able
to break a tie the path-id is checked as the last step (this is not
part of the RFC but required).

OK benno@

Revision 1.85 / (download) - annotate - [select for diffs], Tue May 4 09:21:05 2021 UTC (3 years, 1 month ago) by claudio
Branch: MAIN
Changes since 1.84: +5 -3 lines
Diff to previous 1.84 (colored)

Update comment to match reality.

Revision 1.84 / (download) - annotate - [select for diffs], Tue Apr 20 08:03:12 2021 UTC (3 years, 1 month ago) by claudio
Branch: MAIN
Changes since 1.83: +12 -12 lines
Diff to previous 1.83 (colored)

prefix_insert() and prefix_remove() emulate a tail queue by keeping the
tail pointer (pointer to last element) around and depending on the state
of the list insert at head or insert after tailp. Now gcc has a hard time
to realize that the tail pointer is not used uninitalized. So rewrite the
code to be more explicit about tailp handling (also rename the pointer
to be more explicit). All in all this should be more readable and silences
the gcc warning as well.

Revision 1.83 / (download) - annotate - [select for diffs], Mon Mar 8 12:18:46 2021 UTC (3 years, 3 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE, OPENBSD_6_9
Changes since 1.82: +6 -3 lines
Diff to previous 1.82 (colored)

When introducing prefix_eligible() I botched up one if statement.
For nexthops it is fine if they point to NULL. This is used in local
announcements. Only if they point to a real struct the state must be
NEXTHOP_REACH.
Bug reported by and OK florian@

Revision 1.82 / (download) - annotate - [select for diffs], Tue Mar 2 09:45:07 2021 UTC (3 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.81: +50 -14 lines
Diff to previous 1.81 (colored)

Introduce 'rde evaluate all' a mode to work around path hiding in IXP
route-server environments.

By default only the best path is sent to peers and if that path is filtered
then the path is hidden for that peer. On route-servers this is sometimes
not desried. For this 'rde evaluate all' will cause the evaluation process
to fall back to alternate routes and will redistribute the first non-filtered
path to the peer. This is very similar to per-peer RIBs but accomplishes
the same effect without the massive increase in memory usage. Compared to
the default mode this requires more CPU resources but it is probably less
than what per-peer RIBs would require.

'rde evaluate all' can be set and reset globally, on groups and on idividual
neighbors. It is not limited to route-server configs but route loops are
possible if not properly used.

OK benno@

Revision 1.81 / (download) - annotate - [select for diffs], Tue Feb 2 15:24:43 2021 UTC (3 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.80: +141 -25 lines
Diff to previous 1.80 (colored)

Properly implement 'rde med compare strict' and make sure that the order
of prefixes is always correct. The strict RFC4271 way of checking MED is
requires to check the neighbor AS and only do the check if the AS are equal.
Because of this it is possible that inserting or removing a route reshuffles
the total order.

prefix_cmp() was extended to return the location where the decision happened:
- 0 if the decision was before the MED comparison or med compare always is set
- 1 if the decision happened after the MED comparison
- 2 if the MED made caused the decision

With this the new functions prefix_insert() and prefix_remove() are able
to decide if more prefixes need to be evaluated (testall was not 0.) and
if prefixes need to be re-evaluated after this one was put (testall = 2).
There is a local redo list where prefixes where the MED resulted in a
reshuffle are put on. After the new prefix is inserted all prefixes on
the redo list are reinserted. Because now all affected MED routes get
reevaluated the order is always correct.

Revision 1.80 / (download) - annotate - [select for diffs], Thu Jan 14 08:29:26 2021 UTC (3 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.79: +60 -28 lines
Diff to previous 1.79 (colored)

Cleanup prefix_cmp() a bit. Make sure that the return value can not overflow
the int type by doing calculations on bigger types. Instead just do a > and <
check. Also improve the remote_addr test by using the same address comparison
as in other places.
OK benno@

Revision 1.79 / (download) - annotate - [select for diffs], Wed Jan 13 11:34:01 2021 UTC (3 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.78: +20 -16 lines
Diff to previous 1.78 (colored)

Extend prefix_evaluate() to also be used when withdrawing a prefix.
Doing the LIST_REMOVE() outside of prefix_evalute() is no longer valid.
As a benefit it is now simply possible to re-evaluate a prefix by passing
it to prefix_evaluate() for both removal and insertion. prefix_evaluate()
will then take care to ensure that a update is sent out if necessary.

Also move rde_send_kroute() call to rde_generate_updates() to make it a
bit easier to plug this module into a regress test.

OK denis@

Revision 1.78 / (download) - annotate - [select for diffs], Fri Aug 9 13:44:27 2019 UTC (4 years, 10 months ago) by claudio
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.77: +3 -3 lines
Diff to previous 1.77 (colored)

Rename some of the prefix functions to make it clearer. Also rename
path_update to prefix_update since this is now more working on a prefix.
OK clang

Revision 1.77 / (download) - annotate - [select for diffs], Wed Aug 7 10:26:41 2019 UTC (4 years, 10 months ago) by claudio
Branch: MAIN
Changes since 1.76: +12 -3 lines
Diff to previous 1.76 (colored)

Improve RIB reload behaviour. Especially when the rtable changes or the
route evaluation is modified. In both cases the softreconfig code will
now walk the RIB and ensure that everything is in proper sync.
Additionally remove 'route-collector yes|no' from the bgpd config, instead
use 'rde rib Loc-RIB no evaluate' with the benefit that you can alter
the setting now during runtime.
Tested and OK benno@

Revision 1.76 / (download) - annotate - [select for diffs], Mon Jul 22 07:34:16 2019 UTC (4 years, 10 months ago) by claudio
Branch: MAIN
Changes since 1.75: +2 -3 lines
Diff to previous 1.75 (colored)

No need to check first if something is not NULL to assign NULL to it.
Just do it all the time.

Revision 1.75 / (download) - annotate - [select for diffs], Wed Jul 17 10:13:26 2019 UTC (4 years, 10 months ago) by claudio
Branch: MAIN
Changes since 1.74: +10 -7 lines
Diff to previous 1.74 (colored)

Change the Adj-RIB-Out to a per peer set of RB trees. The way RIB data
structures are linked does not scale for the Adj-RIB-Out and so inserts
and updates into the Adj-RIB-Out did not scale because of some linear
list traversals in hot paths.

A synthetic test with 4000 peers announcing one prefix each showed that
the initial convergence time dropped from around 1 hout to around 6min.

Note: because the Adj-RIB-Out is now per peer the order in which prefixes
are dumped in 'bgpctl show rib out' changed.

Tested and OK job@, benno@, phessler@

Revision 1.74 / (download) - annotate - [select for diffs], Mon Jan 21 02:07:56 2019 UTC (5 years, 4 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.73: +7 -6 lines
Diff to previous 1.73 (colored)

Use Adj-RIB-Out to push UPDATE messages to peers instead of having another
set of RB trees of prefixes and atribute. Refactor most of the update code
which removes some strange buffer handling. By building the output queue
directly in the Adj-RIB-Out the top memory usage during startup is greatly
reduced which should help busy server.
Tested by phessler@ and myself

Revision 1.73 / (download) - annotate - [select for diffs], Tue Dec 4 14:13:40 2018 UTC (5 years, 6 months ago) by claudio
Branch: MAIN
Changes since 1.72: +1 -10 lines
Diff to previous 1.72 (colored)

Since a while announcements added by bgpctl will overwrite the ones from
the config and no longer live next to each other. Because of this step 13
in the decision process is no longer needed.
OK benno@

Revision 1.72 / (download) - annotate - [select for diffs], Thu Sep 27 15:53:14 2018 UTC (5 years, 8 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.71: +3 -2 lines
Diff to previous 1.71 (colored)

Add some extra curlies to make code more legible.

Revision 1.71 / (download) - annotate - [select for diffs], Wed Aug 29 08:51:49 2018 UTC (5 years, 9 months ago) by claudio
Branch: MAIN
Changes since 1.70: +6 -2 lines
Diff to previous 1.70 (colored)

Adjust comment to make it clear that a NULL nexthop is actually eligable

Revision 1.70 / (download) - annotate - [select for diffs], Mon Aug 6 08:06:49 2018 UTC (5 years, 10 months ago) by claudio
Branch: MAIN
Changes since 1.69: +8 -8 lines
Diff to previous 1.69 (colored)

Assign peer1 and peer2 early on and use them everywhere instead of aspX->peer.

Revision 1.69 / (download) - annotate - [select for diffs], Tue Jul 24 10:10:58 2018 UTC (5 years, 10 months ago) by claudio
Branch: MAIN
Changes since 1.68: +7 -5 lines
Diff to previous 1.68 (colored)

Use prefix_nexthop() to access the nexthop instead of dereferencing the
field in asp directly. This is a step to move the prefix from rde_aspath
to struct prefix.
OK benno@

Revision 1.68 / (download) - annotate - [select for diffs], Thu Jun 21 17:26:16 2018 UTC (5 years, 11 months ago) by claudio
Branch: MAIN
Changes since 1.67: +2 -8 lines
Diff to previous 1.67 (colored)

Nothing is using the active and prefix count in struct rde_aspath.
Remove them to make the code simpler.
OK deraadt@ gsoares@

Revision 1.67 / (download) - annotate - [select for diffs], Mon Feb 5 03:55:54 2018 UTC (6 years, 4 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3
Changes since 1.66: +21 -17 lines
Diff to previous 1.66 (colored)

Change struct prefix a bit. Make the aspath pointer opaque and remove the
direct pointer to the pt_prefix struct. To getter functions prefix_aspath()
and prefix_peer() added to make access of the opaque pointers possible.
Looks good henning@ and benno@

Revision 1.66 / (download) - annotate - [select for diffs], Wed Jan 25 00:15:38 2017 UTC (7 years, 4 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.65: +3 -3 lines
Diff to previous 1.65 (colored)

Switch rde_generate_update and rde_send_kroute to accept a struct rib instead
of the id. For this we move the rtableid into struct rib. Also move the update
code in rib.c up to where the kroute code is. Makes more senses like that.

Revision 1.65 / (download) - annotate - [select for diffs], Tue Jan 24 23:38:12 2017 UTC (7 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.64: +5 -5 lines
Diff to previous 1.64 (colored)

Save some space in struct rib_entry so it is back to 64bytes (on 64bit archs).
Doing this by folding the lock flag into a pointer and providing an accessor
function for the rib pointer. This is an acceptable middle path for this
important structure.
OK benno@ on an earlier version

Revision 1.64 / (download) - annotate - [select for diffs], Tue Jan 24 04:22:42 2017 UTC (7 years, 4 months ago) by benno
Branch: MAIN
Changes since 1.63: +2 -1 lines
Diff to previous 1.63 (colored)

sync log.c from relayd et al to bgpd.

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

ok claudio@ florian@

Revision 1.63 / (download) - annotate - [select for diffs], Mon Jan 23 22:47:59 2017 UTC (7 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.62: +3 -3 lines
Diff to previous 1.62 (colored)

Introduce a struct rib sitting between struct rib_desc and struct rib_tree.
This way the tree becomes a bit better decoupled.

Revision 1.62 / (download) - annotate - [select for diffs], Wed Jul 4 20:43:26 2012 UTC (11 years, 11 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9, 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, OPENBSD_5_2_BASE, OPENBSD_5_2
Changes since 1.61: +28 -8 lines
Diff to previous 1.61 (colored)

Seems like I missed to adjust the route decision code to cover the things
that need to be checked because of route reflection. Do this now and reference
the new RR RFC in the man page. OK henning@ sthen@

Revision 1.61 / (download) - annotate - [select for diffs], Thu Apr 12 17:31:05 2012 UTC (12 years, 1 month ago) by claudio
Branch: MAIN
Changes since 1.60: +5 -5 lines
Diff to previous 1.60 (colored)

The ebgp flags is just a truth value and it is better to not == 1 compares.
OK henning@ sthen@

Revision 1.60 / (download) - annotate - [select for diffs], Mon May 3 13:09:38 2010 UTC (14 years, 1 month ago) by claudio
Branch: MAIN
CVS Tags: 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.59: +2 -2 lines
Diff to previous 1.59 (colored)

Make it possible to load multiple routing tables at the same time and use
those for alternate RIBs. This allows to use "rde rib TESTIT rtable 1".
NOTE: nexthop verification has changed for alternate tables. For now
nexthop will only be verified against the main routing table (id 0).
Because of this "nexthop qualify via bgp" may now compare the nexthops
against bgpd routes from a different RIB.
Tested by sthen@, OK to move on by henning@

Revision 1.59 / (download) - annotate - [select for diffs], Thu Aug 6 08:53:11 2009 UTC (14 years, 10 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.58: +8 -2 lines
Diff to previous 1.58 (colored)

Implement the error handling as proposed in draft-ietf-idr-optional-transitive
for optional transitive attributes. In short if the partial bit is set on
an optional transitive attribute but the attribute fails validation ignore
the attribute or mark the path as ineligible instead of killing the session
with a NOTIFICATION. Tested, input and OK sthen, OK henning

Revision 1.58 / (download) - annotate - [select for diffs], Mon Jun 29 14:10:13 2009 UTC (14 years, 11 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.57: +2 -2 lines
Diff to previous 1.57 (colored)

Doh! Fix logic botch that disconnected the FIB from the Loc-RIB instead of
making sure that other RIBs are not injecting routes into the FIB.

Revision 1.57 / (download) - annotate - [select for diffs], Sat Jun 6 01:07:01 2009 UTC (15 years ago) by claudio
Branch: MAIN
Changes since 1.56: +3 -2 lines
Diff to previous 1.56 (colored)

Only the main Loc-RIB should update the FIB for now. So introduce a
F_RIB_NOFIB flag and apply it on all RIBs that are not F_RIB_NOEVALUATE.

Revision 1.56 / (download) - annotate - [select for diffs], Sat Jun 6 01:02:51 2009 UTC (15 years ago) by claudio
Branch: MAIN
Changes since 1.55: +2 -2 lines
Diff to previous 1.55 (colored)

Only generate updates for peers that are member of the RIB that update is
comming from.

Revision 1.55 / (download) - annotate - [select for diffs], Mon Jun 1 21:20:17 2009 UTC (15 years ago) by claudio
Branch: MAIN
Changes since 1.54: +2 -2 lines
Diff to previous 1.54 (colored)

Instead of storing a pointer to the RIB head in the RIB element use that
space for a flags field and the RIB id. In the end bgpd will be able to
lock RIB elements and therefore make it possible to interrupt all tree
walks.

Revision 1.54 / (download) - annotate - [select for diffs], Thu May 21 15:47:03 2009 UTC (15 years ago) by claudio
Branch: MAIN
Changes since 1.53: +2 -9 lines
Diff to previous 1.53 (colored)

Make it possible to turn off the decision process per RIB. This is mainly
used for the Adj-Rib-In. Also initialize the Adj-Rib-In correctly and mark
it a noevaluate.

Revision 1.53 / (download) - annotate - [select for diffs], Sun May 17 12:25:15 2009 UTC (15 years ago) by claudio
Branch: MAIN
Changes since 1.52: +30 -30 lines
Diff to previous 1.52 (colored)

Rework most of the RDE to allow multiple RIBs. This is mostly preparation
work by changing the way the RDE DB is built. struct prefix and struct
pt_entry are simplified and extended with a rib_entry where the decision
tree is run on. From now on a prefix can only reside on one particular RIB
which simplifies the code a bit. Currently there are two fixed ribs
(adj-rib-in and the local-rib) which needs to be made more dynamic in
upcomming commits.
This is work in progress, the RDE seems to work for me and sthen@ (no flames
comming out of our testrouters but there is still a lot missing)
Move into the tree to simplify developement -- henning@

Revision 1.52 / (download) - annotate - [select for diffs], Thu Apr 23 19:23:27 2009 UTC (15 years, 1 month ago) by claudio
Branch: MAIN
Changes since 1.51: +9 -2 lines
Diff to previous 1.51 (colored)

Rework the way we handle announced networks. Instead of two freak rde_peers
use one that is less freaky. Merge bgpctl and config networks into one tree.
First step of a larger change in the RDE and this goes now in to allow to
move forward.

Revision 1.49.2.1 / (download) - annotate - [select for diffs], Fri May 9 08:22:10 2008 UTC (16 years, 1 month ago) by henning
Branch: OPENBSD_4_3
Changes since 1.49: +6 -6 lines
Diff to previous 1.49 (colored) next main 1.50 (colored)

MFC (claudio)
Compare flags against the right flag field or else unexpected things may
happen. The decision process failed to correctly mask looping pathes and
in some szenarios even elected them as best route. *gulp*
Found the hard way and fix tested by Christian, bsd (at) cleondra (dot) ch

Revision 1.51 / (download) - annotate - [select for diffs], Thu May 8 09:51:46 2008 UTC (16 years, 1 month ago) by henning
Branch: MAIN
CVS Tags: OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4
Changes since 1.50: +2 -2 lines
Diff to previous 1.50 (colored)

KNF

Revision 1.50 / (download) - annotate - [select for diffs], Fri May 2 13:53:19 2008 UTC (16 years, 1 month ago) by claudio
Branch: MAIN
Changes since 1.49: +6 -6 lines
Diff to previous 1.49 (colored)

Compare flags against the right flag field or else unexpected things may
happen. The decision process failed to correctly mask looping pathes and
in some szenarios even elected them as best route. *gulp*
Found the hard way and fix tested by Christian, bsd (at) cleondra (dot) ch

Revision 1.49 / (download) - annotate - [select for diffs], Tue Nov 27 01:13:54 2007 UTC (16 years, 6 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_3_BASE
Branch point for: OPENBSD_4_3
Changes since 1.48: +10 -3 lines
Diff to previous 1.48 (colored)

Prefixes or actually pathes that would cause a rooting loops should not be
dropped when parsed but instead be added to the RIB marked as not eligible.
So the decision process does not pick them up as a valid route.
Tested and some ideas by Tony Sarendal (tony (at) polarcap (dot) org)

Revision 1.48 / (download) - annotate - [select for diffs], Fri May 11 11:27:59 2007 UTC (17 years, 1 month ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.47: +4 -4 lines
Diff to previous 1.47 (colored)

Various spelling fixes from Stuart Henderson.

Revision 1.47 / (download) - annotate - [select for diffs], Tue Jan 24 12:52:11 2006 UTC (18 years, 4 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1, OPENBSD_4_0_BASE, OPENBSD_4_0, OPENBSD_3_9_BASE, OPENBSD_3_9
Changes since 1.46: +3 -5 lines
Diff to previous 1.46 (colored)

Update comment to match reality.

Revision 1.46 / (download) - annotate - [select for diffs], Sat Jan 14 22:39:49 2006 UTC (18 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.45: +10 -3 lines
Diff to previous 1.45 (colored)

Small step in supporting the Adj-RIB-In additionaly to the Local-RIB.
First step is to define two flags F_LOCAL and F_ORIGINAL. These flags
are used to distinguish prefix in the Local-RIB and those in the Adj-
RIB-In. Adapt prefix API and add additional checks so that no Adj-RIB-
In prefixes get mistakenly selected. Currently no F_ORIGINAL prefixes
are created but this may change soon. Looks good Henning.

Revision 1.45 / (download) - annotate - [select for diffs], Fri Jan 13 13:04:33 2006 UTC (18 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.44: +10 -8 lines
Diff to previous 1.44 (colored)

Simplify evaluation process. Instead of checking the reachability of a prefix
at many different places do it once. This simplifies the logic and makes it
easier to extend it for upcomming Adj-RIB-In addition. OK Henning.

Revision 1.44 / (download) - annotate - [select for diffs], Wed Jan 4 12:50:31 2006 UTC (18 years, 5 months ago) by claudio
Branch: MAIN
Changes since 1.43: +4 -2 lines
Diff to previous 1.43 (colored)

If the decision process is turned of but a prefix is still active decrease the
active prefix counter.

Revision 1.43 / (download) - annotate - [select for diffs], Tue Nov 29 21:11:07 2005 UTC (18 years, 6 months ago) by claudio
Branch: MAIN
Changes since 1.42: +11 -7 lines
Diff to previous 1.42 (colored)

Add a flags field to struct prefix which will be used shortly. Remove the peer
pointer so that the size does not grow. Adding 4 bytes to struct prefix would
result in 64MB more memory usage on one of my systems.

Revision 1.42 / (download) - annotate - [select for diffs], Tue Aug 9 20:27:25 2005 UTC (18 years, 10 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.41: +3 -2 lines
Diff to previous 1.41 (colored)

Introduce new route decision tunable "rde med compare (always|strict)".
If set to always the med will also be compared between different AS.
The default is strict which is the way the RFC specifies it.
OK henning@

Revision 1.41 / (download) - annotate - [select for diffs], Tue Apr 12 14:32:01 2005 UTC (19 years, 2 months ago) by claudio
Branch: MAIN
Changes since 1.40: +15 -5 lines
Diff to previous 1.40 (colored)

Introduce a per prefix weight.  The weight is used to tip prefixes with equal
long AS pathes in one or the other direction.  It weights a prefix at a very
late stage in the decision process. This is a nice bgpd feature to traffic
engineer networks where most AS pathes are equally long.
OK henning@

Revision 1.40 / (download) - annotate - [select for diffs], Thu Nov 11 10:35:15 2004 UTC (19 years, 7 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_7
Changes since 1.39: +8 -4 lines
Diff to previous 1.39 (colored)

New config statement "rde route-age [evaluate|ignore]". If set to evaluate
the best path selection will not only be based on the path attributes but
also on the age of the prefix. This is an extension to the RFC. The default
is ignore but previously it was implicitly set to evaluate.
OK henning@ man page OK jaredy@ jmc@

Revision 1.39 / (download) - annotate - [select for diffs], Thu Sep 16 04:29:54 2004 UTC (19 years, 8 months ago) by henning
Branch: MAIN
Changes since 1.38: +2 -3 lines
Diff to previous 1.38 (colored)

minor KNF

Revision 1.38 / (download) - annotate - [select for diffs], Fri Aug 6 12:04:08 2004 UTC (19 years, 10 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_3_6_BASE, OPENBSD_3_6
Changes since 1.37: +14 -19 lines
Diff to previous 1.37 (colored)

Monster diff to get one step closer to IPv6 support.
Cleanup path attribute handling. First of all kill struct attr_flags, all
those infos are now in struct rde_aspath. Second move attribute parser
functions into rde.c, rde_attr.c is shared between bgpd and bgpctl.
Third reimplementation of the nexthop handling. Make it IPv6 ready and
fix some major bug relating to "set nexthop".
henning@ OK if it breaks nothing

Revision 1.37 / (download) - annotate - [select for diffs], Thu Aug 5 18:44:19 2004 UTC (19 years, 10 months ago) by claudio
Branch: MAIN
Changes since 1.36: +5 -5 lines
Diff to previous 1.36 (colored)

Cleanup aspath specific functions and api. Mainly switch to a refcnt based
allocation. This helps to save a bit of RAM. looks good henning@

Revision 1.36 / (download) - annotate - [select for diffs], Wed Jul 28 17:10:15 2004 UTC (19 years, 10 months ago) by claudio
Branch: MAIN
Changes since 1.35: +5 -5 lines
Diff to previous 1.35 (colored)

Prefer the path with the lowest multi-exit discriminator (MED) not the biggest.

Revision 1.35 / (download) - annotate - [select for diffs], Tue Jun 22 23:17:01 2004 UTC (19 years, 11 months ago) by claudio
Branch: MAIN
Changes since 1.34: +4 -10 lines
Diff to previous 1.34 (colored)

Cleanup. jajaja henning@

Revision 1.34 / (download) - annotate - [select for diffs], Mon Apr 26 00:46:52 2004 UTC (20 years, 1 month ago) by claudio
Branch: MAIN
Changes since 1.33: +14 -13 lines
Diff to previous 1.33 (colored)

Cleanup the decision function and take the age of the entry into account.
Prefer older, more stable entries. OK henning@

Revision 1.33 / (download) - annotate - [select for diffs], Thu Mar 11 14:22:23 2004 UTC (20 years, 3 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_3_5_BASE, OPENBSD_3_5
Changes since 1.32: +3 -2 lines
Diff to previous 1.32 (colored)

Shutdown the RDE cleanly on exit. Plug some memleaks. OK henning@

Revision 1.32 / (download) - annotate - [select for diffs], Mon Mar 1 16:02:01 2004 UTC (20 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.31: +9 -1 lines
Diff to previous 1.31 (colored)

Make it possible to diable the decision process. This is a feature only useful
for route-collectors. OK henning@

Revision 1.31 / (download) - annotate - [select for diffs], Fri Feb 27 20:53:56 2004 UTC (20 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.30: +12 -12 lines
Diff to previous 1.30 (colored)

remove unneded peer pointer in struct prefix and change a in_addr_t to
struct in_addr. OK henning@

Revision 1.30 / (download) - annotate - [select for diffs], Thu Feb 26 15:46:30 2004 UTC (20 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.29: +5 -9 lines
Diff to previous 1.29 (colored)

Clean up comments and replace a if with a ENSURE because NULL nexthops are
illegal. OK henning@

Revision 1.29 / (download) - annotate - [select for diffs], Thu Feb 26 14:00:33 2004 UTC (20 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.28: +3 -3 lines
Diff to previous 1.28 (colored)

Implement "enforce neighbor-as yes|no" which is by default on for ebgp
neighbors. While doing that check also that the nexthop is valid (not class D
or E and not in 127/8 range). Kill some TODO and XXX and rename the british
neighbour to neighbor as used everywhere else. OK henning@

Revision 1.28 / (download) - annotate - [select for diffs], Tue Feb 17 14:22:40 2004 UTC (20 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.27: +5 -1 lines
Diff to previous 1.27 (colored)

Make sure that we add the new prefix to the prefix list or bad things will
happen. OK henning@

Revision 1.27 / (download) - annotate - [select for diffs], Wed Feb 4 09:07:44 2004 UTC (20 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.26: +1 -505 lines
Diff to previous 1.26 (colored)

Move the update generation into a separate file. The update generation has
nothing to do with the decision process. henning@ "conceptual ok ;-)"

Revision 1.26 / (download) - annotate - [select for diffs], Sun Feb 1 19:46:05 2004 UTC (20 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.25: +3 -1 lines
Diff to previous 1.25 (colored)

Set sane default announce types according to the peer type. For IBGP use
announce all and for EBGP use announce self. OK henning@

Revision 1.25 / (download) - annotate - [select for diffs], Tue Jan 27 16:49:53 2004 UTC (20 years, 4 months ago) by henning
Branch: MAIN
Changes since 1.24: +8 -5 lines
Diff to previous 1.24 (colored)

use a struct bgpd_addr instead of sockaddr_in for peer_config->local_addr and
->remote_addr for easier multiprotocol support

ok claudio@

Revision 1.24 / (download) - annotate - [select for diffs], Thu Jan 22 20:34:56 2004 UTC (20 years, 4 months ago) by henning
Branch: MAIN
Changes since 1.23: +8 -9 lines
Diff to previous 1.23 (colored)

use log_warnx and log_info. reclassify a few messages in the process and fix
a few messages.

ok claudio@

Revision 1.23 / (download) - annotate - [select for diffs], Sun Jan 18 00:44:44 2004 UTC (20 years, 4 months ago) by deraadt
Branch: MAIN
Changes since 1.22: +3 -3 lines
Diff to previous 1.22 (colored)

spacing

Revision 1.22 / (download) - annotate - [select for diffs], Sat Jan 17 19:35:36 2004 UTC (20 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.21: +8 -9 lines
Diff to previous 1.21 (colored)

Make it possible to announce own networks. In the RDE these prefixes are
attached to a pseudo peer and inserted like all other prefixes into the RIB.
OK henning@

Revision 1.21 / (download) - annotate - [select for diffs], Tue Jan 13 17:11:29 2004 UTC (20 years, 4 months ago) by henning
Branch: MAIN
Changes since 1.20: +2 -2 lines
Diff to previous 1.20 (colored)

KNF

Revision 1.20 / (download) - annotate - [select for diffs], Tue Jan 13 16:15:37 2004 UTC (20 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.19: +9 -1 lines
Diff to previous 1.19 (colored)

Do not redistribute updates to ibgp peers. OK henning@

Revision 1.19 / (download) - annotate - [select for diffs], Tue Jan 13 13:45:50 2004 UTC (20 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.18: +33 -1 lines
Diff to previous 1.18 (colored)

Implement a max-prefix and a announce none | self | all neighbor statement.
The first limits the number of sent prefixes per peer the latter controls
which prefix we do annouce to the neighbor.
Another looks good from henning@

Revision 1.18 / (download) - annotate - [select for diffs], Tue Jan 13 13:18:03 2004 UTC (20 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.17: +61 -63 lines
Diff to previous 1.17 (colored)

Dump and send RIB to the neighbor if his session is comming up.
Now bgpctl neighbor <IP> up does work as expected.
Looks good from henning@

Revision 1.17 / (download) - annotate - [select for diffs], Tue Jan 13 12:38:50 2004 UTC (20 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.16: +17 -5 lines
Diff to previous 1.16 (colored)

Do not send routes back to sender as per rfc. OK henning@

Revision 1.16 / (download) - annotate - [select for diffs], Mon Jan 12 13:33:16 2004 UTC (20 years, 5 months ago) by claudio
Branch: MAIN
Changes since 1.15: +49 -11 lines
Diff to previous 1.15 (colored)

Nexthop announcement fixup. There are different rules for ibgp and ebgp.
For ibgp the nexthop is normally passed unmodified unless the nexthop is
equal to the remote peer ip. To ebgp peers the nexthop is changed to the
local session ip unless the remote peer ip and the nexthop are on the same
subnet. OK henning@

Revision 1.15 / (download) - annotate - [select for diffs], Sun Jan 11 21:47:20 2004 UTC (20 years, 5 months ago) by claudio
Branch: MAIN
Changes since 1.14: +11 -8 lines
Diff to previous 1.14 (colored)

Move all struct in_addr to either struct bgpd_addr or in_addr_t whichever
is more appropriate. The rde uses now in most cases struct bgpd_addr.
OK henning@

Revision 1.14 / (download) - annotate - [select for diffs], Sun Jan 11 02:39:05 2004 UTC (20 years, 5 months ago) by henning
Branch: MAIN
Changes since 1.13: +4 -4 lines
Diff to previous 1.13 (colored)

KNF

Revision 1.13 / (download) - annotate - [select for diffs], Sat Jan 10 22:25:42 2004 UTC (20 years, 5 months ago) by claudio
Branch: MAIN
Changes since 1.12: +17 -11 lines
Diff to previous 1.12 (colored)

Implement as path prepends. At least one prepend is needed for ebgp
neighbors. Fix a bug in the update generation. If no path attributes are
available e.g. a packet with only withdraws we need to set (and write) the
bgp path attribute field to zero. With this change we are able to send
valid updates to our neighbors with one exception: the nexthop field which
needs to be changed for ebgp neighbors.
OK henning@

Revision 1.12 / (download) - annotate - [select for diffs], Sat Jan 10 16:20:29 2004 UTC (20 years, 5 months ago) by claudio
Branch: MAIN
Changes since 1.11: +413 -2 lines
Diff to previous 1.11 (colored)

RDE update generation. First we queue all updates and withdraws on a per
peer basis. A queue runner will dequeue and package those messages to valid
bgp UPDATE messages and send them to the SE.
Not yet done is per peer type attribute handling (like aspath prepends and
nexthop modifications) and the queue runner could be a tad smarter. All in
all this gives us a good starting point for the missing parts.
OK henning@

Revision 1.11 / (download) - annotate - [select for diffs], Wed Jan 7 00:01:17 2004 UTC (20 years, 5 months ago) by claudio
Branch: MAIN
Changes since 1.10: +2 -4 lines
Diff to previous 1.10 (colored)

Make sure that kroute updates for the FIB are only sent if there is a
change. Until now rde_send_kroute tried to send a IMSG_KROUTE_DELETE if old
and new prefix where ineligible. OK henning@

Revision 1.10 / (download) - annotate - [select for diffs], Tue Jan 6 10:51:14 2004 UTC (20 years, 5 months ago) by claudio
Branch: MAIN
Changes since 1.9: +2 -2 lines
Diff to previous 1.9 (colored)

2004 OK henning@

Revision 1.9 / (download) - annotate - [select for diffs], Tue Jan 6 03:43:50 2004 UTC (20 years, 5 months ago) by henning
Branch: MAIN
Changes since 1.8: +2 -2 lines
Diff to previous 1.8 (colored)

2004

Revision 1.8 / (download) - annotate - [select for diffs], Mon Jan 5 22:33:49 2004 UTC (20 years, 5 months ago) by claudio
Branch: MAIN
Changes since 1.7: +3 -3 lines
Diff to previous 1.7 (colored)

fix comments
OK henning@

Revision 1.7 / (download) - annotate - [select for diffs], Fri Dec 26 22:41:01 2003 UTC (20 years, 5 months ago) by henning
Branch: MAIN
Changes since 1.6: +12 -5 lines
Diff to previous 1.6 (colored)

"when you try to be very smart, something breaks horribly"
zap aspath->state, which was a copy of aspath->nexthop->state, for a tiny
little bit faster access. tho, it happened what had to happen, they ran
out of sync.
it's just not worth it.

also add a missinf LIST_INIT.

Revision 1.6 / (download) - annotate - [select for diffs], Fri Dec 26 19:28:52 2003 UTC (20 years, 5 months ago) by henning
Branch: MAIN
Changes since 1.5: +8 -5 lines
Diff to previous 1.5 (colored)

o the aspath->state checks should be != NEXTHOP_REACH, not == NEXTHOP_UNREACH
o do not send a kroute_add request when the only aspath for the given
| prefix has an nexthop whihc is not reachable (can be unreachable or
| unchecked - that's why the check for == unreachable is not enough)

Revision 1.5 / (download) - annotate - [select for diffs], Fri Dec 26 18:07:33 2003 UTC (20 years, 5 months ago) by henning
Branch: MAIN
Changes since 1.4: +2 -2 lines
Diff to previous 1.4 (colored)

when this project started and i added the fatal() function, I made it take
the error number as parameter instead of accessing errno, because in one
place the error number was not in errno but fetched from a socket.
now, of course it makes much more sense to just set errno to the error number
just fecthed in this one place instead of having hundreds of fatal() calls
all transfer the errno round and round and round...
fix this, and also provide a fatalx, which does not care for errno and doesn't
invoke strerror.
oh, btw, in the place where we fetch the err # from the socket, we don't
call fatal anymore anyway...

Revision 1.4 / (download) - annotate - [select for diffs], Wed Dec 24 11:39:43 2003 UTC (20 years, 5 months ago) by henning
Branch: MAIN
Changes since 1.3: +5 -5 lines
Diff to previous 1.3 (colored)

typos in comments, from jared

Revision 1.3 / (download) - annotate - [select for diffs], Tue Dec 23 18:52:46 2003 UTC (20 years, 5 months ago) by claudio
Branch: MAIN
Changes since 1.2: +2 -2 lines
Diff to previous 1.2 (colored)

In case of exit the RDE need to tell the parent to remove all still active
prefixes from the kernel routing table. This is done with a simple table
walk. OK henning@

Revision 1.2 / (download) - annotate - [select for diffs], Tue Dec 23 15:59:02 2003 UTC (20 years, 5 months ago) by claudio
Branch: MAIN
Changes since 1.1: +4 -2 lines
Diff to previous 1.1 (colored)

Send updates to the main process so they can be added to the kernel
routing table. OK henning@

Revision 1.1 / (download) - annotate - [select for diffs], Wed Dec 17 11:46:54 2003 UTC (20 years, 5 months ago) by henning
Branch: MAIN

welcome, bgpd
started by me some time ago with moral support from theo, the proceeded up to
the point where the session engine worked correctly. claudio jeker joined
then and did a lot of work in the RDE.
it is not particulary usefull as application right now as parts are still
missing but is imported to enable more people to work on it.
status:
BGP sessions get established fine, OPEN messages and then KEEPALIVEs
exchanged etc. session FSM works fine; NOTIFICATIONs are handled fine, and
all connection drops etc I provoked get handled fine.
Incoming UPDATE messgages are parsed well and the data entered to the RIB,
the decision process is not yet there, neither is outgoing UPDATEs or sync
to the kernel routing table.

not connected to the builds yet.

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.