OpenBSD CVS

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


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.168 / (download) - annotate - [select for diffs], Thu May 30 08:29:30 2024 UTC (2 days, 11 hours ago) by claudio
Branch: MAIN
CVS Tags: HEAD
Changes since 1.167: +2 -2 lines
Diff to previous 1.167 (colored)

Fix copy-paste error in last commit. Fixes lladdr and l3vpn regress.
Noticed by anton@

Revision 1.167 / (download) - annotate - [select for diffs], Wed May 29 10:41:12 2024 UTC (3 days, 9 hours ago) by claudio
Branch: MAIN
Changes since 1.166: +16 -6 lines
Diff to previous 1.166 (colored)

Handle IPvX only interfaces with IPvY sessions more gracefully.

In up_get_nexthop() check that the local_vX_addr is actually valid
before using it. In the UPDATE generation functions check that the
nexthop is valid before adding it and fail hard if it does not exist.
You can't announce an IPv4 prefix/gateway over an IPv6 only link.
OK henning@ sthen@

Revision 1.166 / (download) - annotate - [select for diffs], Tue Jan 23 16:13:35 2024 UTC (4 months, 1 week ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5
Changes since 1.165: +3 -3 lines
Diff to previous 1.165 (colored)

Start converting the message parser to use the new ibuf api.

Rewrite rde_update_dispatch() to use ibufs. Because of this
rde_update_err(), rde_get_mp_nexthop(), nlri_get_prefix() and
friends are switched to use ibufs. For rde_attr_parse() a minimal
change was done for now.

OK tb@

Revision 1.165 / (download) - annotate - [select for diffs], Tue Jan 23 15:59:56 2024 UTC (4 months, 1 week ago) by claudio
Branch: MAIN
Changes since 1.164: +4 -4 lines
Diff to previous 1.164 (colored)

KNF, space before EOL

Revision 1.164 / (download) - annotate - [select for diffs], Thu Oct 12 14:16:28 2023 UTC (7 months, 2 weeks ago) by claudio
Branch: MAIN
Changes since 1.163: +6 -1 lines
Diff to previous 1.163 (colored)

In up_generate_addpath_all() ensure that the new prefix is valid.

This should fix a fatal error reported by Arend Brouwer (arend at eritap com)
when "announce add-path send all" is used.
As a workaround "announce add-path send best plus 500" can used.

OK tb@

Revision 1.163 / (download) - annotate - [select for diffs], Wed Jul 12 14:45:43 2023 UTC (10 months, 3 weeks ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_4_BASE, OPENBSD_7_4
Changes since 1.162: +285 -319 lines
Diff to previous 1.162 (colored)

Update OpenBGPD to use new ibuf API.

This replaces the old way of using a static buffer and a len to build
UPDATEs with a pure ibuf solution. The result is much cleaner and a lot
of almost duplicate code can be removed because often a version for ibufs
and one for this static buffer was implemented (e.g. for mrt or bgpctl).
With and OK tb@

Revision 1.162 / (download) - annotate - [select for diffs], Wed Apr 19 08:30:37 2023 UTC (13 months, 2 weeks ago) by claudio
Branch: MAIN
Changes since 1.161: +21 -3 lines
Diff to previous 1.161 (colored)

Add handling for flowspec in the update path.

Flowspec has no nexthop so adjust up_prep_adjout() to handle a NULL nexthop.
Add the MP_REACH encoding in up_generate_mp_reach for flowspec.
OK tb@

Revision 1.161 / (download) - annotate - [select for diffs], Wed Mar 29 10:46:11 2023 UTC (14 months ago) by claudio
Branch: MAIN
Changes since 1.160: +23 -38 lines
Diff to previous 1.160 (colored)

Switch prefix_adjout_get and new prefix_adjout_first to use a pt_entry
as argument instead of the bgpd_addr + prefixlen.

Do the same with prefix_adjout_update but leave prefix_adjout_lookup
and prefix_adjout_match since those are used by bgpctl code that does
not use pt_entry structs.

With this most of the update code no longer needs struct bgpd_addr and
pt_getaddr().
OK tb@

Revision 1.160 / (download) - annotate - [select for diffs], Tue Mar 28 15:17:34 2023 UTC (14 months ago) by claudio
Branch: MAIN
Changes since 1.159: +3 -5 lines
Diff to previous 1.159 (colored)

Instead of exracting the prefix into a bgpd_addr and passing that to
prefix_write() rename prefix_write() to pt_write() and pass a pt_entry to
the function. Removes an extra conversion step.
OK tb@

Revision 1.159 / (download) - annotate - [select for diffs], Mon Mar 13 16:52:42 2023 UTC (14 months, 2 weeks ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_3_BASE, OPENBSD_7_3
Changes since 1.158: +2 -2 lines
Diff to previous 1.158 (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.158 / (download) - annotate - [select for diffs], Fri Mar 10 07:57:16 2023 UTC (14 months, 3 weeks ago) by claudio
Branch: MAIN
Changes since 1.157: +16 -20 lines
Diff to previous 1.157 (colored)

Compile the output filter rules into per peer filter rules.

especially on route-servers the output filters are in the hot path so
reducing the number of rules to check has a big impact. I have seen a
25% to 30% speedup in my big IXP testbench.
The output ruleset is applied and copied for each peer during config reload
and when a peer is initially added.
OK tb@

Revision 1.157 / (download) - annotate - [select for diffs], Thu Mar 9 13:12:19 2023 UTC (14 months, 3 weeks ago) by claudio
Branch: MAIN
Changes since 1.156: +15 -14 lines
Diff to previous 1.156 (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.156 / (download) - annotate - [select for diffs], Mon Feb 13 18:07:53 2023 UTC (15 months, 2 weeks ago) by claudio
Branch: MAIN
Changes since 1.155: +33 -48 lines
Diff to previous 1.155 (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.155 / (download) - annotate - [select for diffs], Sat Feb 11 08:50:43 2023 UTC (15 months, 2 weeks ago) by claudio
Branch: MAIN
Changes since 1.154: +103 -148 lines
Diff to previous 1.154 (colored)

Refactor common code of the 3 up_generate functions into up_process_prefix()
Simplifies up_generate_updates(), up_generate_addpath() and
up_generate_addpath_all() a fair bit.
OK tb@

Revision 1.154 / (download) - annotate - [select for diffs], Thu Feb 9 13:43:23 2023 UTC (15 months, 3 weeks ago) by claudio
Branch: MAIN
Changes since 1.153: +15 -12 lines
Diff to previous 1.153 (colored)

Instead of relaying struct peer from the SE to the RDE to fill out 10
stat numbers, just send the peerid and have the RDE response with the
stats. The control code will then merge these counters into the real
peer struct and send that to bgpctl. This reduces the number of bytes
sent around a fair bit.
OK tb@

Revision 1.153 / (download) - annotate - [select for diffs], Tue Jan 24 11:28:41 2023 UTC (16 months, 1 week ago) by claudio
Branch: MAIN
Changes since 1.152: +2 -4 lines
Diff to previous 1.152 (colored)

Implement ASPA validation and reload logic on ASPA set changes.

For this use the validation state (vstate) in struct prefix and
struct filterstate to store both the ASPA and ROA validity.
Introduce helper functions to set and get the various states for
struct prefix and make sure struct filterstate is also setup properly.
Change the ASPA state in rde_aspath to be AFI/AID and role independent
by storing all 4 possible outcomes. Also add a ASPA generation count
which is used to update the rde_aspath ASPA state cache on reloads.
Rework the rde_aspa.c code to be AFI/AID and role independent. Doing
this for roles is trivial but AFI switch goes deep and is so unnecessary.
The reload is combined with the ROA reload logic and renamed to RPKI
softreload.

OK tb@

Revision 1.152 / (download) - annotate - [select for diffs], Wed Jan 18 17:40:17 2023 UTC (16 months, 1 week ago) by claudio
Branch: MAIN
Changes since 1.151: +8 -9 lines
Diff to previous 1.151 (colored)

Use the vstate of the filterstate struct instead of passing an extra copy
to the various prefix update functions.
While there fix a filterstate leak in up_generate_updates().
With and OK tb@

Revision 1.151 / (download) - annotate - [select for diffs], Thu Jan 12 17:35:51 2023 UTC (16 months, 2 weeks ago) by claudio
Branch: MAIN
Changes since 1.150: +7 -15 lines
Diff to previous 1.150 (colored)

Split rde_filterstate_prep() into three functions.
- rde_filterstate_init(): initialize a filterstate to default values
- rde_filterstate_copy(): copy from a filterstate into a new state object
- rde_filterstate_prep(): set filtersate based on prefix passed as argument.

This makes the code a bit easier to read.
OK tb@

Revision 1.150 / (download) - annotate - [select for diffs], Wed Jan 11 17:10:26 2023 UTC (16 months, 2 weeks ago) by claudio
Branch: MAIN
Changes since 1.149: +17 -15 lines
Diff to previous 1.149 (colored)

Add the validation state to the filterstate struct.
Removes vstate argument from rde_filter().
Rename prefix_vstate() to prefix_roa_vstate().
OK tb@

Revision 1.149 / (download) - annotate - [select for diffs], Wed Jan 11 13:53:17 2023 UTC (16 months, 2 weeks ago) by claudio
Branch: MAIN
Changes since 1.148: +4 -1 lines
Diff to previous 1.148 (colored)

Add ASPA validation functions to the RDE.

This implements ASPA validation based on the current draft. Implementing
this showed various weaknesses in the current ASPA draft which I hope to
fix in the near future.

Unlike the algorithm specified in the draft our version validates the
AS_PATH attribute in a single path doing one or two lookups depending on
the sessions BGP role.

The code is not yet hooked up into the RDE (see the NOTYET blocks).
Missing are reload logic, bgpctl integration and the loading of the
merged ASPA set from the rtr process.

OK tb@

Revision 1.148 / (download) - annotate - [select for diffs], Fri Sep 23 15:49:20 2022 UTC (20 months, 1 week ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2
Changes since 1.147: +108 -1 lines
Diff to previous 1.147 (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.147 / (download) - annotate - [select for diffs], Thu Sep 1 13:19:11 2022 UTC (21 months ago) by claudio
Branch: MAIN
Changes since 1.146: +1 -2 lines
Diff to previous 1.146 (colored)

This code no longer needs siphash.h and also cleanup some leftover
prototypes and members that were not removed in the previous RB tree
conversions.
OK benno@ tb@

Revision 1.146 / (download) - annotate - [select for diffs], Wed Aug 17 15:15:26 2022 UTC (21 months, 2 weeks ago) by claudio
Branch: MAIN
Changes since 1.145: +7 -7 lines
Diff to previous 1.145 (colored)

Convert bzero() to memset(), bcmp() to memcmp() and bcopy() to memcpy().

The memory regions passed to memcpy() can not overlap so no need for memmove().
OK tb@ deraadt@

Revision 1.145 / (download) - annotate - [select for diffs], Mon Jul 11 17:08:21 2022 UTC (22 months, 3 weeks ago) by claudio
Branch: MAIN
Changes since 1.144: +133 -1 lines
Diff to previous 1.144 (colored)

Implement send side of RFC7911 ADD-PATH

This allows to send out more then one path per perfix to a neighbor that
supports add-path receive. OpenBGPD supports a few different modes to
select which paths to send:
  - all:	send all valid paths (the ones with a * in bgpctl output)
  - best:	send out only the single best path
  - ecmp:	send out paths that evaluate the same up and including
                the nexthop metric
  - as-wide-best: send out paths that evaluete the same up but not including
		  the nexthop metric
Currently ecmp and as-wide-best are the same. On top of this best, ecmp
and as-wide-best allow to include extra paths (e.g. best plus 2) and
for the multipath modes there is also a maximum (e.g. ecmp plus 2 max 4)

OK tb@

Revision 1.144 / (download) - annotate - [select for diffs], Mon Jul 11 16:58:58 2022 UTC (22 months, 3 weeks ago) by claudio
Branch: MAIN
Changes since 1.143: +6 -3 lines
Diff to previous 1.143 (colored)

Properly roll back in the add-path send case in up_dump_prefix()

When up_dump_prefix() runs out of space while filling out prefixes
a possible path_id needs to be removed from the buf or else a corrupted
UPDATE is sent out.
OK tb@

Revision 1.143 / (download) - annotate - [select for diffs], Mon Jul 11 16:55:21 2022 UTC (22 months, 3 weeks ago) by claudio
Branch: MAIN
Changes since 1.142: +48 -42 lines
Diff to previous 1.142 (colored)

Put the RFC9234 open policy handing in its own function

While there fix a spelling mistake and remove an extra check for new == NULL
and old == NULL. The caller make this check already.
OK tb@

Revision 1.142 / (download) - annotate - [select for diffs], Fri Jul 8 10:01:52 2022 UTC (22 months, 3 weeks ago) by claudio
Branch: MAIN
Changes since 1.141: +10 -5 lines
Diff to previous 1.141 (colored)

Pass path_id_tx to the Adj-RIB-Out

Adjust prefix_adjout_update() to properly handle path_id_tx.
Move the lookup of the prefix out of prefix_adjout_update() and to
up_generate_updates(). While that code uses prefix_adjout_lookup() to
find the current prefix in the Adj-RIB-Out and add-path aware function
will use prefix_adjout_get().

In up_generate_default() just use 0 for path_id_tx since for this peer
that is the only prefix installed into the Adj-RIB-Out.

OK tb@

Revision 1.141 / (download) - annotate - [select for diffs], Mon Jun 27 13:26:51 2022 UTC (23 months ago) by claudio
Branch: MAIN
Changes since 1.140: +42 -2 lines
Diff to previous 1.140 (colored)

Add support for RFC 9234 - Route Leak Prevention and Detection Using Roles

With this it is possible to send a role in the OPEN message and if that
was successful the RDE will add the new OTC attribute if necessary.
OK tb@

Revision 1.140 / (download) - annotate - [select for diffs], Mon May 23 13:40:12 2022 UTC (2 years ago) by deraadt
Branch: MAIN
Changes since 1.139: +3 -3 lines
Diff to previous 1.139 (colored)

whitespaces found when I went checking for something else

Revision 1.139 / (download) - annotate - [select for diffs], Wed Mar 30 16:06:32 2022 UTC (2 years, 2 months ago) by tb
Branch: MAIN
CVS Tags: OPENBSD_7_1_BASE, OPENBSD_7_1
Changes since 1.138: +20 -21 lines
Diff to previous 1.138 (colored)

Simplify up_generate_updates()

Instead of using new == NULL or new != NULL in combination with an again
label to steer the control flow of this function, switch to using a while
loop and break/continue/return. Simplified version of a diff by claudio.

ok claudio

Revision 1.138 / (download) - annotate - [select for diffs], Tue Mar 22 10:53:08 2022 UTC (2 years, 2 months ago) by claudio
Branch: MAIN
Changes since 1.137: +2 -2 lines
Diff to previous 1.137 (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.137 / (download) - annotate - [select for diffs], Tue Mar 15 16:50:29 2022 UTC (2 years, 2 months ago) by claudio
Branch: MAIN
Changes since 1.136: +3 -3 lines
Diff to previous 1.136 (colored)

Replace the eor member of struct prefix with a flag. Saves a byte that
will be reused soon.
OK denis@ tb@

Revision 1.136 / (download) - annotate - [select for diffs], Wed Mar 2 16:51:43 2022 UTC (2 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.135: +4 -16 lines
Diff to previous 1.135 (colored)

Adapt prefix_adjout_update() the same way as prefix_adjout_withdraw()
and to the accounting in the function.
OK tb@

Revision 1.135 / (download) - annotate - [select for diffs], Wed Mar 2 14:44:46 2022 UTC (2 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.134: +4 -6 lines
Diff to previous 1.134 (colored)

Refactor prefix_adjout_withdraw()

Just pass the prefix to be withdrawn to the function and move the lookup
up. Adjust how the various accounting vars are updated so that the
values are decremented in the right cases. Do the same accounting dance
for prefix_adjout_destroy(). Adjust rde_up_flush_upcall() to directly
call prefix_adjout_withdraw() without calling it via up_generate_updates().
OK tb@

Revision 1.134 / (download) - annotate - [select for diffs], Tue Mar 1 09:53:42 2022 UTC (2 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.133: +4 -5 lines
Diff to previous 1.133 (colored)

up_dump_prefix() should not clear the p->flags before possibly calling
prefix_adjout_destroy(). Doing so will restult in a double pt_unref()
call because prefix_adjout_destroy() no longer notices that the prefix
was an actuall withdraw and wrongly calls prefix_unlink().
For updates the PREFIX_FLAG_UPDATE flag needs to be cleared after
removing the prefix from the update RB tree.
Adjust the EoR codepath in a similar way. EoR have a NULL pt_entry and
so prefix_adjout_destroy() is unable to do the RB_REMOVE.
This fixes the regress errors reported by anton@
OK tb@

Revision 1.133 / (download) - annotate - [select for diffs], Thu Feb 24 14:54:03 2022 UTC (2 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.132: +2 -3 lines
Diff to previous 1.132 (colored)

struct prefix holds path_id_tx for the path id sent to peers when
add-path send is enabled. Start using this instead of 0. Currently
nothing sets path_id_tx to any value != 0 so this is the same but
a bit more correct.
OK tb@

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

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

Revision 1.131 / (download) - annotate - [select for diffs], Mon Aug 9 08:15:35 2021 UTC (2 years, 9 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0
Changes since 1.130: +10 -1 lines
Diff to previous 1.130 (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.130 / (download) - annotate - [select for diffs], Thu Jun 17 08:14:50 2021 UTC (2 years, 11 months ago) by claudio
Branch: MAIN
Changes since 1.129: +47 -26 lines
Diff to previous 1.129 (colored)

Before adding a prefix to the Adj-RIB-Out modify the attributes to the
ones being sent out. Mainly prepend the ASPATH if needed and also change
the nexthop to the one being sent.
This should make the `bgpctl show rib out` output show the values the
peer receives.
OK job@

Revision 1.129 / (download) - annotate - [select for diffs], Thu May 27 14:32:08 2021 UTC (3 years ago) by claudio
Branch: MAIN
Changes since 1.128: +3 -3 lines
Diff to previous 1.128 (colored)

Rename and move functions used to get per-peer settings to the
hopefully better names peer_has_as4byte() and peer_accept_no_as_set().
Move them to rde_peer.c where all other peer functions live.
OK sthen@

Revision 1.128 / (download) - annotate - [select for diffs], Thu May 27 08:45:24 2021 UTC (3 years ago) by claudio
Branch: MAIN
Changes since 1.127: +13 -9 lines
Diff to previous 1.127 (colored)

When generating updates for a peer that has 'rde evaluate all' set the
old prefix pointer is most probably NULL. If a secondary route is removed
the withdraw would not happen because old == NULL which skips the withdraw.

Access to old is only needed to extract the prefix. So instead extract the
prefix early and use it for both cases. So if 'rde evaluate all' is used
the code tries all prefixes and if none is allowed a withdraw is issued.

Problem noticed and fix tested by Pier Carlo Chiodi

Revision 1.127 / (download) - annotate - [select for diffs], Thu May 6 09:18:54 2021 UTC (3 years ago) by claudio
Branch: MAIN
Changes since 1.126: +6 -6 lines
Diff to previous 1.126 (colored)

Improve reload behaviour of RDE peer flags and export_type.

Add an extra reload barrier (IMSG_RECONF_DRAIN) to the sync of the peer
config from the session engine to the rde. Necessary to ensure that the
peer config is up to date in the RDE before hitting reconfiguration.

Store the export_type and the peer flags outside of peer->conf. Adjust all
users of these two fields so they only look at the copies in peer.
During reload check the values with the peer->conf to check for changes.

If the export_type or the rde evaluate or transparent-as flags changed
flush the Adj-RIB-Out for that peer and in a 2nd step rebuild the RIB from
scratch. This results in a lot of UPDATE churn but these configs are not
altered often.

Fix multiple issues in the rde_softreconfig_in_done handler that resulted
in multiple runs of the out stage of the softreconfig pipeline.

OK benno@

Revision 1.126 / (download) - annotate - [select for diffs], Tue Apr 20 11:19:56 2021 UTC (3 years, 1 month ago) by claudio
Branch: MAIN
Changes since 1.125: +5 -5 lines
Diff to previous 1.125 (colored)

Update comment to be less confusing (I hope)

Revision 1.125 / (download) - annotate - [select for diffs], Tue Mar 2 09:45:07 2021 UTC (3 years, 3 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE, OPENBSD_6_9
Changes since 1.124: +48 -22 lines
Diff to previous 1.124 (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.124 / (download) - annotate - [select for diffs], Sat Jan 9 16:49:41 2021 UTC (3 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.123: +2 -35 lines
Diff to previous 1.123 (colored)

Move peer related checks from up_test_update() to rde_generate_updates()
both the export check and the address family check should be done as
early as possible since these peers will not need any kind of updates
to happen. Also remove the non-standard ORIGINATOR_ID check.
With this up_test_update() becomes a simple true/false function which
makes the rest of the code a bit simpler.
OK benno@

Revision 1.123 / (download) - annotate - [select for diffs], Fri Jan 24 05:44:05 2020 UTC (4 years, 4 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.122: +30 -4 lines
Diff to previous 1.122 (colored)

Implement 'max-prefix NUM out' to limit the number of announced prefixes.
This is an easy safety switch to not leak full tables to upstreams and
peers. If the limit is hit a Cease notification is sent and the session
is closed.
This implements most of https://tools.ietf.org/html/draft-sa-idr-maxprefix-00
OK job@

Revision 1.122 / (download) - annotate - [select for diffs], Tue Aug 13 12:16:20 2019 UTC (4 years, 9 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.121: +9 -24 lines
Diff to previous 1.121 (colored)

Instead of passing a struct prefix pointer to rde_filter() pass the 4 values
prefix_peer, prefix_vstate and prefix/prefixlen to the function. This removes
some ugly hacks in cases where the prefix was not available.
Also adjust the order of arguments of rde_attr_set() to match rde_filter().
OK benno@

Revision 1.121 / (download) - annotate - [select for diffs], Fri Aug 9 13:44:27 2019 UTC (4 years, 9 months ago) by claudio
Branch: MAIN
Changes since 1.120: +6 -5 lines
Diff to previous 1.120 (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.120 / (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.119: +15 -16 lines
Diff to previous 1.119 (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.119 / (download) - annotate - [select for diffs], Tue Jul 2 12:07:00 2019 UTC (4 years, 11 months ago) by claudio
Branch: MAIN
Changes since 1.118: +12 -11 lines
Diff to previous 1.118 (colored)

up_generate_default() needs to fake a prefix entry so that the outbound
filtering can happen. rde_filter no longer reads the re pointer but
instead the prefix entry pointer pt. So instead of faking a re entry
allocate a pt entry including the refcount dance. Also make sure that
the validation state is set to ROA_NOTFOUND.
Problem found by dlg@

Revision 1.118 / (download) - annotate - [select for diffs], Sat Jun 22 05:44:05 2019 UTC (4 years, 11 months ago) by claudio
Branch: MAIN
Changes since 1.117: +9 -9 lines
Diff to previous 1.117 (colored)

Add a direct pointer from struct prefix to struct pt_entry.
This changes makes it possible to not use the struct rib_entry pointer
which will be used to optimize the Adj-RIB-Out.
Also adjust pt_ref() and pt_unref() so that the code can be written
a bit more compact. Also prefix_cmp() no longer needs to go via
rib_compare() and calls pt_prefix_cmp() directly.
OK phessler@

Revision 1.117 / (download) - annotate - [select for diffs], Wed Jun 19 08:15:07 2019 UTC (4 years, 11 months ago) by claudio
Branch: MAIN
Changes since 1.116: +6 -3 lines
Diff to previous 1.116 (colored)

With the community rewrite the output code needs to also check the
communities member of struct prefix to decide if prefixes can be
put together into the same update. This bug results in prefixes
being sent out with the wrong comminities.

Revision 1.116 / (download) - annotate - [select for diffs], Mon Jun 17 12:02:44 2019 UTC (4 years, 11 months ago) by claudio
Branch: MAIN
Changes since 1.115: +4 -2 lines
Diff to previous 1.115 (colored)

Adjust comment.

Revision 1.115 / (download) - annotate - [select for diffs], Mon Jun 17 11:02:20 2019 UTC (4 years, 11 months ago) by claudio
Branch: MAIN
Changes since 1.114: +44 -56 lines
Diff to previous 1.114 (colored)

Completley rewrite the community matching and handling code. All community
attributes are put into a new data structure when parsing the UPDATE.
The filter code can quickly lookup and modify this data structure.
When creating an UPDATE the data is put back into wire format.
Setups using a lot of communities benefit a lot from this.
Input and OK benno@

Revision 1.114 / (download) - annotate - [select for diffs], Tue Jun 11 19:43:56 2019 UTC (4 years, 11 months ago) by florian
Branch: MAIN
Changes since 1.113: +2 -2 lines
Diff to previous 1.113 (colored)

Fix typo which resulted in a segfault in ebgp multihop setups.
OK claudio

Revision 1.108.2.1 / (download) - annotate - [select for diffs], Fri Jun 7 15:02:29 2019 UTC (4 years, 11 months ago) by sthen
Branch: OPENBSD_6_5
Changes since 1.108: +6 -3 lines
Diff to previous 1.108 (colored) next main 1.109 (colored)

MFC bgpd fix - rev 1.110 (commitid: caT0IdwFlZr7OxNo)

fix export default-route.

Revision 1.113 / (download) - annotate - [select for diffs], Fri Jun 7 09:45:48 2019 UTC (4 years, 11 months ago) by claudio
Branch: MAIN
Changes since 1.112: +89 -196 lines
Diff to previous 1.112 (colored)

Refactor up_get_nexthop() to work for all AFI/SAFI cases. Additionally
clean up the possible nexthop overrides to better match the RFC.
- set nexthop self is still overriding all other decisions
- set nexthop no-modify has only relevance for ebgp multihop links
  Instead of using the router locall address the nexthop is passed unmodified
- set nexthop <address> depends on BGP session type
  * for IBGP sessions the address will be used unless it is the same as the
    remote peers address
  * for directly connected EBGP sessions the address is only used if the IP
    is part of the connected network (no matter what other flags are used).
  * for multihop EBGP sessions it depends if no-modify was also set
Adjust manual page to explain this properly.
"probably OK" job@

Revision 1.112 / (download) - annotate - [select for diffs], Fri May 31 09:46:31 2019 UTC (5 years ago) by claudio
Branch: MAIN
Changes since 1.111: +8 -3 lines
Diff to previous 1.111 (colored)

Exit the attribute loop early if there are no unknown attributes left
and the loop passed all attributes known by bgpd. Saves about 80% of
time in up_generate_attr().
OK phessler@

Revision 1.111 / (download) - annotate - [select for diffs], Mon May 13 21:13:04 2019 UTC (5 years ago) by claudio
Branch: MAIN
Changes since 1.110: +143 -107 lines
Diff to previous 1.110 (colored)

Don't use a hardcoded list of how attribute are dumped and instead move
to a loop-switch construct in up_generate_attr().  This way attributes
are always dumped in ascending order as suggested by the RFC and adding
special attributes is simpler than in the current way.
The MP attributes are a special case since those are handled at a later
stage of creating UPDATE messages.
OK benno@

Revision 1.110 / (download) - annotate - [select for diffs], Mon May 13 13:47:36 2019 UTC (5 years ago) by denis
Branch: MAIN
Changes since 1.109: +6 -3 lines
Diff to previous 1.109 (colored)

fix export default-route.

OK claudio@

Revision 1.109 / (download) - annotate - [select for diffs], Thu May 9 22:27:33 2019 UTC (5 years ago) by claudio
Branch: MAIN
Changes since 1.108: +2 -2 lines
Diff to previous 1.108 (colored)

Neither rde_apply_set() nor rde_filter() are called with a NULL state so
remove some unneeded == NULL checks.
OK benno@

Revision 1.108 / (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
Branch point for: OPENBSD_6_5
Changes since 1.107: +415 -787 lines
Diff to previous 1.107 (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.107 / (download) - annotate - [select for diffs], Sun Dec 30 13:53:07 2018 UTC (5 years, 5 months ago) by denis
Branch: MAIN
Changes since 1.106: +84 -1 lines
Diff to previous 1.106 (colored)

add support for IPv6 VPN routes

The kernel bits are missing as of now. With input from claudio@ and kn@

OK claudio@

Revision 1.106 / (download) - annotate - [select for diffs], Wed Dec 19 15:26:42 2018 UTC (5 years, 5 months ago) by claudio
Branch: MAIN
Changes since 1.105: +7 -7 lines
Diff to previous 1.105 (colored)

Fold ext-communities into filter_community so that bgpd can match
multiple ext-communities at the same time as well. Additionally this fixes
parsing some of the ext-community types. Now all communities are handled
by one common struct.
OK benno@ plus some input from denis@

Revision 1.105 / (download) - annotate - [select for diffs], Thu Nov 29 12:10:51 2018 UTC (5 years, 6 months ago) by claudio
Branch: MAIN
Changes since 1.104: +3 -2 lines
Diff to previous 1.104 (colored)

community_ext_delete_non_trans() allocates new memory in all cases where
nlen > 0. So in those cases it is important to free() that memory after
use in all cases.
OK phessler@

Revision 1.104 / (download) - annotate - [select for diffs], Wed Nov 28 08:32:27 2018 UTC (5 years, 6 months ago) by claudio
Branch: MAIN
Changes since 1.103: +24 -8 lines
Diff to previous 1.103 (colored)

Start reworking community handling. Merge standard communities and large
communities into one filter_community struct and allow it that more then
one community can be used in filter rules (currently up to 3).
Also rework the code handling bgpctl show rib commands. The special IMSG
types for the various filters are gone and the code is in general simpler.
OK job@, phessler@

Revision 1.103 / (download) - annotate - [select for diffs], Sun Nov 4 12:34:54 2018 UTC (5 years, 6 months ago) by claudio
Branch: MAIN
Changes since 1.102: +13 -74 lines
Diff to previous 1.102 (colored)

Introduce a real Adj-RIB-Out. At the same time remove the update_rib
introduced before 6.4 because it now can be replaced with the real RIB.
Main changes are:
- simplified 'show rib' handling since everything is now a real RIB
- path_update() is now returning if a prefix was not modified, added or moved
- softreconfig out case is simpler since path_update does all the magic now
- Adjust shutdown code to work with the Adj-RIB-Out
Tested and OK denis@, benno@

Revision 1.102 / (download) - annotate - [select for diffs], Wed Oct 24 08:26:37 2018 UTC (5 years, 7 months ago) by claudio
Branch: MAIN
Changes since 1.101: +3 -3 lines
Diff to previous 1.101 (colored)

Major refactoring of the RIB handling code. Mainly change how the RIB is
walked. rib_dump_r() is now an internal function and instead the code gets
an additional callback for throttling the rib_dump code. This removes a
lot of similar code used to make sure the RDE is not walking to fast and
replaces it with simpler callbacks. The other big change is the removal
of struct rib pointers in other data structures. The rib pointers are not
stable because of a realloc() call happening when extending the array so
instead use the RIB ID as a reference.
Tested and OK denis@ and benno@

Revision 1.101 / (download) - annotate - [select for diffs], Mon Oct 15 10:44:47 2018 UTC (5 years, 7 months ago) by claudio
Branch: MAIN
Changes since 1.100: +17 -1 lines
Diff to previous 1.100 (colored)

Use the up_rib tree to withdraw all prefixes of a peer which is used to
reload peers into a new RIB. Removes one additional full RIB tree walker.
OK benno@

Revision 1.100 / (download) - annotate - [select for diffs], Sat Sep 29 07:43:36 2018 UTC (5 years, 8 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.99: +57 -6 lines
Diff to previous 1.99 (colored)

Introduce minimal tracking of announced prefixes. A per peer RB tree tracks
which prefixes were sent out as UPDATE. At withdraw time the RB tree can be
consulted to know if the withdraw actually needs to be sent to the peer.
This replaces the faulty heuristic that was used before and caused either
that unneeded withdraw to be sent or in the worst case failing to send a
necessary withdraw resulting in stuck routes.
OK benno@

Revision 1.99 / (download) - annotate - [select for diffs], Tue Sep 18 16:54:01 2018 UTC (5 years, 8 months ago) by sthen
Branch: MAIN
Changes since 1.98: +2 -2 lines
Diff to previous 1.98 (colored)

s/mulitprotocol/multiprotocol/ in error text

Revision 1.98 / (download) - annotate - [select for diffs], Sun Sep 9 12:33:51 2018 UTC (5 years, 8 months ago) by claudio
Branch: MAIN
Changes since 1.97: +1 -2 lines
Diff to previous 1.97 (colored)

Clean up prefix flag handling. First of all the dynamic networks no longer
need this and are now treated equally to the network statement in the config.
This makes bgpctl network delete <net> also remove a network which was defined
in the config.
While there remove the other use of flag which was done to support Adj-RIB-Out
but the direction we're taking is no longer needing that. Makes code simpler
again.
OK benno@

Revision 1.97 / (download) - annotate - [select for diffs], Wed Aug 8 13:49:20 2018 UTC (5 years, 9 months ago) by claudio
Branch: MAIN
Changes since 1.96: +9 -6 lines
Diff to previous 1.96 (colored)

Make the (non-)transitive handling of ext communities a bit more obvious.

Revision 1.96 / (download) - annotate - [select for diffs], Fri Aug 3 16:31:22 2018 UTC (5 years, 9 months ago) by claudio
Branch: MAIN
Changes since 1.95: +9 -9 lines
Diff to previous 1.95 (colored)

Move nexthop and nexthop flags from the rde_aspath to struct prefix.
struct prefix will be slowly becomming the hub of the rib.
OK phessler@ job@

Revision 1.95 / (download) - annotate - [select for diffs], Sun Jul 22 16:59:08 2018 UTC (5 years, 10 months ago) by claudio
Branch: MAIN
Changes since 1.94: +69 -67 lines
Diff to previous 1.94 (colored)

Move nexthop into struct filterstate (including nexthop flags) and use
them whereever possible. In some places (path_update, softreconfig_out
handler) the nexthop state is temporarily folded back into the rde_aspath.
Tested and OK benno@

Revision 1.94 / (download) - annotate - [select for diffs], Mon Jul 9 14:08:48 2018 UTC (5 years, 10 months ago) by claudio
Branch: MAIN
Changes since 1.93: +17 -23 lines
Diff to previous 1.93 (colored)

Introduce a struct filterstate and pass this to rde_filter instead of
passing the asp. This is no longer using asp_get() and should be therefor
be a bit lighter. Will also allow to put more stuff into the state.
OK denis@ sthen@

Revision 1.93 / (download) - annotate - [select for diffs], Thu Jun 28 09:54:48 2018 UTC (5 years, 11 months ago) by claudio
Branch: MAIN
Changes since 1.92: +5 -6 lines
Diff to previous 1.92 (colored)

Remove rde_aspath pointer from rde_filter since that argument can be fetched
from the prefix instead. While there also switch to prefix_peer from asp->peer
in rde_dump_rib_as(). Makes the code easier overall.

Revision 1.92 / (download) - annotate - [select for diffs], Thu Jun 28 08:07:21 2018 UTC (5 years, 11 months ago) by claudio
Branch: MAIN
Changes since 1.91: +26 -8 lines
Diff to previous 1.91 (colored)

Pass a struct prefix to rde_filter and remove some of the arguments which
are now fetched from struct prefix. Currently some trickery is needed
for export default-route but this will get better once Adj-RIB-Out comes.
OK benno@

Revision 1.91 / (download) - annotate - [select for diffs], Tue Jun 26 13:34:26 2018 UTC (5 years, 11 months ago) by claudio
Branch: MAIN
Changes since 1.90: +2 -2 lines
Diff to previous 1.90 (colored)

Wrong function name in error message.

Revision 1.90 / (download) - annotate - [select for diffs], Wed Jun 13 09:33:51 2018 UTC (5 years, 11 months ago) by claudio
Branch: MAIN
Changes since 1.89: +4 -16 lines
Diff to previous 1.89 (colored)

Deprecate announce (all|self|none|default-route)
The announce keyword was overloaded and confused a lot of operators, time
to clean it up and while there incorporate RFC8212 guideline for propagation.
- `announce all` is the new default but the default deny filter will
  make sure that by default nothing is leaked
- `announce self` is no more and results in syntax error
- `announce none` is now `export none`
- `announce default-route` becomes `export default-route`
- the filters are switched to a default deny rule both incoming and outgoing

You most certainly need to adjust your config!

Best is to change the config in advance by using `announce all` explicitly on
all neighbors and adding `deny from any` and `deny to any` at the start of
your filters and adjust the rest of the filters to still produce the same
result.  `bgpd -nv -f bgpd.conf ` and `bgpctl show rib out nei foo` are good
tools to verify the changes.
Lots of discussions with job@, deraadt@, sthen@
OK job@

Revision 1.89 / (download) - annotate - [select for diffs], Sat Feb 10 05:54:31 2018 UTC (6 years, 3 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3
Changes since 1.88: +12 -15 lines
Diff to previous 1.88 (colored)

Follow rfc8277 more closely and make make sure bgpd is encoding VPNv4
withdraws they way other systems are doing it. Interop problem discovered
by Andrew Thrift. Tested by Andrew and job@.

Revision 1.88 / (download) - annotate - [select for diffs], Mon Feb 5 03:55:54 2018 UTC (6 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.87: +36 -30 lines
Diff to previous 1.87 (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.87 / (download) - annotate - [select for diffs], Sun Feb 4 05:08:16 2018 UTC (6 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.86: +7 -7 lines
Diff to previous 1.86 (colored)

Clenaup RIB handling in the RDE. Introduce some defines for Adj-RIB-In and
Adj-RIB-Out and use them consistently. Makes code easier to read.
OK benno@

Revision 1.86 / (download) - annotate - [select for diffs], Tue May 30 18:08:15 2017 UTC (7 years ago) by benno
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.85: +25 -1 lines
Diff to previous 1.85 (colored)

remove extended communities that have the transitive bit set from
routes announced to an ebgp peer (ref. rfc4360). While here remove the
pratial flag from extended and large communities.
ok claudio@

Revision 1.85 / (download) - annotate - [select for diffs], Sat May 27 10:33:15 2017 UTC (7 years ago) by phessler
Branch: MAIN
Changes since 1.84: +9 -7 lines
Diff to previous 1.84 (colored)

Allow OpenBGPD to selectively choose which local ASN to use per-peer.
This is intended to be used for ASN migrations, not for permanent use.

You MUST use filters to protect yourself from receiving your own routes.
There be dragons and grues.

OK claudio@ benno@

Revision 1.84 / (download) - annotate - [select for diffs], Tue Jan 24 04:22:42 2017 UTC (7 years, 4 months ago) by benno
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.83: +2 -1 lines
Diff to previous 1.83 (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.83 / (download) - annotate - [select for diffs], Mon Jan 23 11:33:41 2017 UTC (7 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.82: +10 -11 lines
Diff to previous 1.82 (colored)

Refactor a bit to make it look a bit more like the rde_update_update code.
No functional change, less recursion and indents.

Revision 1.82 / (download) - annotate - [select for diffs], Thu Dec 18 19:28:44 2014 UTC (9 years, 5 months ago) by tedu
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
Changes since 1.81: +10 -5 lines
Diff to previous 1.81 (colored)

two more uses of siphash. better hash for ipv4. maybe not needed for rbtree
hint, but still pretty. ok deraadt

Revision 1.81 / (download) - annotate - [select for diffs], Wed Aug 14 20:34:27 2013 UTC (10 years, 9 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.80: +7 -9 lines
Diff to previous 1.80 (colored)

Rewrite the internals of the RDE reload logic.
This is the first step to make bgpd reload non blocking in the RDE.
It also speeds up the reload time a fair bit in some cases (mainly if
you run with multiple RIBs and have larger filtersets) and it should also
fix a few edge cases on reloads.
Testing done by benno@, florian@ and sthen@ OK henning@ and benno@

Revision 1.80 / (download) - annotate - [select for diffs], Thu Apr 12 17:31:05 2012 UTC (12 years, 1 month ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2
Changes since 1.79: +6 -6 lines
Diff to previous 1.79 (colored)

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

Revision 1.79 / (download) - annotate - [select for diffs], Fri Dec 31 21:22:42 2010 UTC (13 years, 5 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.78: +2 -1 lines
Diff to previous 1.78 (colored)

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

ok deraadt@, millert@

Revision 1.78 / (download) - annotate - [select for diffs], Thu Feb 11 13:18:05 2010 UTC (14 years, 3 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.77: +31 -5 lines
Diff to previous 1.77 (colored)

While looking through this code I figured out that set nexthop self and
no-modify are not supported for MP protocols like IPv6. Add support for
those and while testing find another bug in the same region. Inverse the
check for the return value of memcmp() -- we're interested in equality.
Until now IPv6 was running with an implicit set nexthop self on all iBGP
sessions. Oups. set nexthop stuff is OK when tested henning@ and sthen@

Revision 1.77 / (download) - annotate - [select for diffs], Wed Jan 13 06:02:37 2010 UTC (14 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.76: +109 -51 lines
Diff to previous 1.76 (colored)

Add support for BGP MPLS VPN aka RFC 4364. This is only the RDE part so
that it is possible to use OpenBGPD as a route-reflector for VPNv4.
Some clean up of the BGP MP code so that multiple protocols are easier
supported. kroute/kernel support not yet done but comming.
OK henning@, reyk@

Revision 1.76 / (download) - annotate - [select for diffs], Sun Jan 10 08:32:08 2010 UTC (14 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.75: +64 -7 lines
Diff to previous 1.75 (colored)

Generate a EoR marker in the update list instead of sending it independent
of the actual update dump. This will get us the right barrier and the EoR
is no longer sent way before the actual dump. Currently a nop since graceful
restart is turned off (unless you have announce restart yes in the config).
put it in henning@

Revision 1.75 / (download) - annotate - [select for diffs], Sat Jan 9 22:59:42 2010 UTC (14 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.74: +2 -2 lines
Diff to previous 1.74 (colored)

Fix fatalx message.

Revision 1.74 / (download) - annotate - [select for diffs], Fri Dec 18 15:51:37 2009 UTC (14 years, 5 months ago) by claudio
Branch: MAIN
Changes since 1.73: +4 -4 lines
Diff to previous 1.73 (colored)

Merge rde_filter_community() with community_match() and kill a useless
indirection.

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

Big AID change part two. This changes the mp capability into an array of
flags. This makes a lot of code much easier since the comparison is now
trivial. Additionally calculate the negotiated capabilities for a session
in the SE and pass that and only that to the RDE. This makes the decisions
in the RDE a lot easier.  OK henning@

Revision 1.72 / (download) - annotate - [select for diffs], Fri Dec 4 13:28:34 2009 UTC (14 years, 6 months ago) by claudio
Branch: MAIN
Changes since 1.71: +2 -2 lines
Diff to previous 1.71 (colored)

Remove a hardcoded AF_INET6 with the correct use of the current AID.
Found the hard way by Laurent CARON (lcaron at unix-scripts info)

Revision 1.71 / (download) - annotate - [select for diffs], Tue Dec 1 14:28:05 2009 UTC (14 years, 6 months ago) by claudio
Branch: MAIN
Changes since 1.70: +24 -24 lines
Diff to previous 1.70 (colored)

Use an artificial address family id in struct bgpd_addr and almost everywhere
else. Adds conversion functions to map AFI/SAFI and the Unix AF_ values
from and into AID used in bgpd.  This is needed to support things like MPLS
VPN and other upcomming changes that need to play a lot with AFI/SAFI pairs.
Mostly mechanical change, henning@ has no particular issues with this.
Must go in so that I can continue working.

Revision 1.70 / (download) - annotate - [select for diffs], Fri Oct 30 15:11:00 2009 UTC (14 years, 7 months ago) by claudio
Branch: MAIN
Changes since 1.69: +4 -2 lines
Diff to previous 1.69 (colored)

Routers with "transparent-as yes" set should behave more like iBGP ones.
In this case export the MED to all peers no matter what. It is no longer
needed to do the set med +0 hack. OK henning@

Revision 1.69 / (download) - annotate - [select for diffs], Thu Aug 6 08:53:11 2009 UTC (14 years, 9 months ago) by claudio
Branch: MAIN
Changes since 1.68: +3 -1 lines
Diff to previous 1.68 (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.68 / (download) - annotate - [select for diffs], Sat Jun 6 01:10:29 2009 UTC (14 years, 11 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.67: +9 -9 lines
Diff to previous 1.67 (colored)

Some preliminary filter magic to support multiple RIBs on the filters.
It is ugly but does the trick for now. Filters will be rewritten anyway.
The rib specifier only makes sense on from rules. e.g. deny rib OMG from any

Revision 1.67 / (download) - annotate - [select for diffs], Thu Mar 26 13:59:30 2009 UTC (15 years, 2 months ago) by henning
Branch: MAIN
Changes since 1.66: +3 -3 lines
Diff to previous 1.66 (colored)

argh, do not reuse the global trans_as flag to be applied to the peer
specific or we had to widen the peer specific flags without need.
defien PERRFLAG_TRANS_AS instead and use that

Revision 1.66 / (download) - annotate - [select for diffs], Sun Mar 22 22:35:00 2009 UTC (15 years, 2 months ago) by henning
Branch: MAIN
Changes since 1.65: +3 -3 lines
Diff to previous 1.65 (colored)

make transparent-as yes|no settable peer neighbor with the global setting
acting as default.
per-neighbor requested by arnold nipper @ decix, ok claudio

Revision 1.65 / (download) - annotate - [select for diffs], Fri Mar 13 04:18:12 2009 UTC (15 years, 2 months ago) by claudio
Branch: MAIN
Changes since 1.64: +8 -10 lines
Diff to previous 1.64 (colored)

Correctly encode MP unreach NLRI so that IPv6 prefixes get removed correctly.
One bug was hiding another bug and only foundry based routers where unhappy
about these bad updates. Found by Arnoud Vermeer and Elisa Jasinska at ams-ix.
OK henning@

Revision 1.64 / (download) - annotate - [select for diffs], Tue Jan 13 21:35:16 2009 UTC (15 years, 4 months ago) by sthen
Branch: MAIN
CVS Tags: OPENBSD_4_5_BASE, OPENBSD_4_5
Changes since 1.63: +3 -3 lines
Diff to previous 1.63 (colored)

Replace NEW_ASPATH/NEW_AGGREGATOR with the naming from RFC4893,
AS4_PATH/AS4_AGGREGATOR. No binary change.

ok claudio

Revision 1.63 / (download) - annotate - [select for diffs], Fri Dec 12 16:05:30 2008 UTC (15 years, 5 months ago) by claudio
Branch: MAIN
Changes since 1.62: +12 -8 lines
Diff to previous 1.62 (colored)

Correctly set the partial bit on the AS4_PATH and AS4_AGGREGATOR attribute.
Per RFC4271 the partial bit must be set if the attribute was not generated
on the originating router. This is mostly cosmetics.
OK sthen@

Revision 1.62 / (download) - annotate - [select for diffs], Sat Nov 1 19:56:27 2008 UTC (15 years, 7 months ago) by claudio
Branch: MAIN
Changes since 1.61: +3 -3 lines
Diff to previous 1.61 (colored)

Use correct function names in fatal() messages.

Revision 1.61 / (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_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3
Changes since 1.60: +4 -1 lines
Diff to previous 1.60 (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.60 / (download) - annotate - [select for diffs], Thu May 31 04:27:00 2007 UTC (17 years ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.59: +12 -12 lines
Diff to previous 1.59 (colored)

Correctly encode ATTR_NEW_AGGREGATOR. The new aggregator is the one that
bgpd uses internaly so we can just dump that one out.
Found by Stuart Henderson, OK henning@

Revision 1.59 / (download) - annotate - [select for diffs], Tue May 29 02:31:42 2007 UTC (17 years ago) by claudio
Branch: MAIN
Changes since 1.58: +36 -21 lines
Diff to previous 1.58 (colored)

Correctly fill the MP reach and unreach update messages. Until now
short updateds included a dummy ::/0 route and the withdraws were totaly
wrong because the AFI/SAFI header was missing.
put it in henning@

Revision 1.58 / (download) - annotate - [select for diffs], Fri May 11 11:27:59 2007 UTC (17 years ago) by claudio
Branch: MAIN
Changes since 1.57: +7 -7 lines
Diff to previous 1.57 (colored)

Various spelling fixes from Stuart Henderson.

Revision 1.57 / (download) - annotate - [select for diffs], Mon Apr 23 13:04:24 2007 UTC (17 years, 1 month ago) by claudio
Branch: MAIN
Changes since 1.56: +67 -9 lines
Diff to previous 1.56 (colored)

Make bgpd 4-byte AS compatible. All internal representations of AS numbers
are now 4-byte instead of the old 2-byte numbers. The only exception are
communities because they can not be switched. The RDE will inflate and deflate
the ASPATH and AGGREGATOR attributes on demand and create the NEW_ASPATH and
NEW_AGGREGATOR field whenever needed. Both old and new stile sessions are
supported and can be mixed. Currently new stile sessions with the 4-byte AS
number capability turned on are only enabled if one of the AS numbers involved
is a 4-byte one.
This is based on an initial diff by Geoff Huston gih (at) apnic (dot) net
Cleanup, testing and bug-fixes by myself (via AS 3.10).
Currently mrt table dumps are producing incompatible output this will be fixed
afterwards -- this diff is already big enough.

"get it in if you think it is ready" henning@

Revision 1.56 / (download) - annotate - [select for diffs], Fri Apr 6 18:03:51 2007 UTC (17 years, 2 months ago) by claudio
Branch: MAIN
Changes since 1.55: +6 -3 lines
Diff to previous 1.55 (colored)

Count the updates and withdraws for additional statisic gathering.
Discussed with henning@

Revision 1.55 / (download) - annotate - [select for diffs], Fri Mar 16 14:06:57 2007 UTC (17 years, 2 months ago) by claudio
Branch: MAIN
Changes since 1.54: +2 -2 lines
Diff to previous 1.54 (colored)

A few more s/2858/4760/ and use RFC <number> everywhere.

Revision 1.54 / (download) - annotate - [select for diffs], Fri Mar 16 13:52:30 2007 UTC (17 years, 2 months ago) by claudio
Branch: MAIN
Changes since 1.53: +3 -3 lines
Diff to previous 1.53 (colored)

Update multiprotocol extension code to RFC 4760. This actually removes
a few things we actually never realy cared about.
OK henning@

Revision 1.53 / (download) - annotate - [select for diffs], Wed Jan 31 15:23:19 2007 UTC (17 years, 4 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.52: +1 -10 lines
Diff to previous 1.52 (colored)

Do not check that the aspath is loopfree for the peer when sending updates.
This is an undocumented optimisation that fails with the introduction of
AS 23456 as placeholder for 4-byte ASN.
OK henning@

Revision 1.52 / (download) - annotate - [select for diffs], Fri Nov 10 14:47:32 2006 UTC (17 years, 6 months ago) by henning
Branch: MAIN
Changes since 1.51: +3 -3 lines
Diff to previous 1.51 (colored)

char -> u_char in a few places
apparently from Jeff Rizzo <riz@NetBSD.org> via "Thomas E. Spanjaard"
<tgen@netphreax.net>, ok claudio

Revision 1.51 / (download) - annotate - [select for diffs], Fri Apr 21 08:49:29 2006 UTC (18 years, 1 month ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.50: +1 -2 lines
Diff to previous 1.50 (colored)

Remove function prototype that was never used. From deraadt@

Revision 1.50 / (download) - annotate - [select for diffs], Tue Apr 4 12:03:26 2006 UTC (18 years, 2 months ago) by henning
Branch: MAIN
Changes since 1.49: +4 -2 lines
Diff to previous 1.49 (colored)

add "set nexthop self", force nexthop to be set to own address even with IBGP
requested & tested Falk Brockerhoff <fb@smartterra.de>, and tony sarendal
tested this too. claudio ok

Revision 1.49 / (download) - annotate - [select for diffs], Fri Jan 13 13:04:33 2006 UTC (18 years, 4 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE, OPENBSD_3_9
Changes since 1.48: +2 -3 lines
Diff to previous 1.48 (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.48 / (download) - annotate - [select for diffs], Thu Jan 12 14:05:13 2006 UTC (18 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.47: +23 -23 lines
Diff to previous 1.47 (colored)

Copy AS path in rde_filter() on demand instead of doing it before calling
rde_filter(). Adapt path_update() to this change too. path_update() does
a path_copy before linking the rde_aspath into the RIB. Looks good Henning.

Revision 1.47 / (download) - annotate - [select for diffs], Thu Jan 5 16:00:07 2006 UTC (18 years, 5 months ago) by claudio
Branch: MAIN
Changes since 1.46: +5 -2 lines
Diff to previous 1.46 (colored)

Cache optional BGP attributes (mostly communities) and use a simple
pointer plus a ref counter to link the attributes to the path object.
Saves +/- 10M on 11 full feeds. Looks good Henning

Revision 1.46 / (download) - annotate - [select for diffs], Fri Dec 30 14:07:40 2005 UTC (18 years, 5 months ago) by claudio
Branch: MAIN
Changes since 1.45: +14 -11 lines
Diff to previous 1.45 (colored)

Use sys/hash.h instead of own built functions that work similar.
While there reorder some structs to help with alignment.

Revision 1.45 / (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.44: +6 -6 lines
Diff to previous 1.44 (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.44 / (download) - annotate - [select for diffs], Tue Nov 29 20:45:21 2005 UTC (18 years, 6 months ago) by claudio
Branch: MAIN
Changes since 1.43: +2 -2 lines
Diff to previous 1.43 (colored)

even more spaces and tabs.

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

Softreconfig out support. On config reload filter changes of outgoing rules
will propagte directly to the neighbors. There is no need to restart bgpd
in that case. Currently not optimal but a good start. "get it in" henning@

Revision 1.42 / (download) - annotate - [select for diffs], Tue Nov 1 14:37:16 2005 UTC (18 years, 7 months ago) by claudio
Branch: MAIN
Changes since 1.41: +154 -264 lines
Diff to previous 1.41 (colored)

Major cleanup in rde_update.c. Merge equal code used in different places
into own functions. Move up_dump_upcall() into rde.c and rename it
rde_up_dump_upcall(). This is needed for the next step.
up_test_update() tests if an update or withdraw is needed and up_generate()
creates the updates.  "get it in" henning@ (he is eager on softreconfig out)

Revision 1.41 / (download) - annotate - [select for diffs], Tue Nov 1 10:58:29 2005 UTC (18 years, 7 months ago) by claudio
Branch: MAIN
Changes since 1.40: +2 -9 lines
Diff to previous 1.40 (colored)

Switch from the per peer filter set list to a filter-only solution.
The default filter_sets are converted into match filter rules that get
evaluated first. Simplifies code massively -- mainly the config reload
part -- and makes softreconfig out a piece of cake.  "get it in" henning@

Revision 1.40 / (download) - annotate - [select for diffs], Wed Oct 19 10:43:01 2005 UTC (18 years, 7 months ago) by henning
Branch: MAIN
Changes since 1.39: +2 -2 lines
Diff to previous 1.39 (colored)

tsc tsc tsc, tabs are not always holy

Revision 1.39 / (download) - annotate - [select for diffs], Wed Aug 10 08:34:06 2005 UTC (18 years, 9 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.38: +12 -8 lines
Diff to previous 1.38 (colored)

Pass the correct peer to rde_apply_set(). rde_apply_set() needs to know
the peer where the prefix came from so that prepend-neighbor works.
Extend rde_filter() and make sure that the correct peer is passed.
Until now most cases resulted in a NULL peer causing a nasty crash that
was found by David Ulevitch. OK henning@

Revision 1.38 / (download) - annotate - [select for diffs], Fri Jul 29 22:26:30 2005 UTC (18 years, 10 months ago) by claudio
Branch: MAIN
Changes since 1.37: +24 -14 lines
Diff to previous 1.37 (colored)

Debugging session at WTH. Fix many bugs in the IPv6 support -- some copy paste
and some more obscure ones. With this is it possible to run IPv6 sessions
between two bgpd.
OK if it does not break IPv4 hummpa barman Henning

Revision 1.37 / (download) - annotate - [select for diffs], Fri Jul 29 12:38:40 2005 UTC (18 years, 10 months ago) by claudio
Branch: MAIN
Changes since 1.36: +318 -55 lines
Diff to previous 1.36 (colored)

Add another piece to the IPv6 puzzle. This time code to generate MP updates.
Does not affect IPv4 minimaly tested for IPv6 because we still don't have an
IPv6 capable neighbor. henning@ ya

Revision 1.36 / (download) - annotate - [select for diffs], Thu Jun 16 18:43:07 2005 UTC (18 years, 11 months ago) by henning
Branch: MAIN
Changes since 1.35: +3 -3 lines
Diff to previous 1.35 (colored)

use prefixlen2mask() instead of doing the bitshifting by hand; fixes the
zero prefixlen case (32 bit shift on 32 bit val -> undefined result)
spotted by Moritz Grimm and otto

Revision 1.35 / (download) - annotate - [select for diffs], Fri Mar 11 12:54:20 2005 UTC (19 years, 2 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_7
Changes since 1.34: +14 -3 lines
Diff to previous 1.34 (colored)

Finally commit the transparent-as and nexthop no-modify stuff I wrote on the
way to FOSDEM. With transparent-as set to ye bgpd will not prepend his own
AS for sent updates. NB the neighbor needs to set "enforce neighbor-as no"
or it will not like the received AS paths. With set nexthop no-modify bgpd
will change the nexthop as done normaly.
OK henning@ man page update with help of jmc@

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

spelling fix

Revision 1.33 / (download) - annotate - [select for diffs], Thu Nov 11 13:29:37 2004 UTC (19 years, 6 months ago) by henning
Branch: MAIN
Changes since 1.32: +5 -5 lines
Diff to previous 1.32 (colored)

spaces at EOL in comments, spotted by theo

Revision 1.32 / (download) - annotate - [select for diffs], Thu Nov 11 13:06:45 2004 UTC (19 years, 6 months ago) by claudio
Branch: MAIN
Changes since 1.31: +7 -7 lines
Diff to previous 1.31 (colored)

Store the local v4 and v6 address of a session. For IPv4 sessions the first
IPv6 address with global scope of the interface used by the session is used.
In any case the local endpoint of the session is used for one of the two no
matter what scope.
OK henning@

Revision 1.31 / (download) - annotate - [select for diffs], Tue Sep 28 12:09:31 2004 UTC (19 years, 8 months ago) by claudio
Branch: MAIN
Changes since 1.30: +10 -1 lines
Diff to previous 1.30 (colored)

Add prepend-neighbor feature. Prepend the remote-as n times similar to
prepend-self. Only for incomming UPDATEs. OK henning@

Revision 1.30 / (download) - annotate - [select for diffs], Fri Aug 20 15:31:56 2004 UTC (19 years, 9 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_3_6_BASE, OPENBSD_3_6
Changes since 1.29: +2 -2 lines
Diff to previous 1.29 (colored)

Grrr. copy paste error. Dump MED and not local-pref. OK henning@

Revision 1.29 / (download) - annotate - [select for diffs], Fri Aug 13 14:03:20 2004 UTC (19 years, 9 months ago) by claudio
Branch: MAIN
Changes since 1.28: +2 -21 lines
Diff to previous 1.28 (colored)

Fix minor issues with IPv6 dumps and add a function for dumping the RIB table
protocol independent. This new dump format is not (yet) supported by the
mrtd route_btoa tool. OK henning@

Revision 1.28 / (download) - annotate - [select for diffs], Tue Aug 10 12:57:18 2004 UTC (19 years, 9 months ago) by claudio
Branch: MAIN
Changes since 1.27: +11 -5 lines
Diff to previous 1.27 (colored)

Correctly set the MED in outgoing UPDATEs. OK henning@

Revision 1.27 / (download) - annotate - [select for diffs], Fri Aug 6 12:04:08 2004 UTC (19 years, 10 months ago) by claudio
Branch: MAIN
Changes since 1.26: +113 -100 lines
Diff to previous 1.26 (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.26 / (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.25: +12 -8 lines
Diff to previous 1.25 (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.25 / (download) - annotate - [select for diffs], Thu Aug 5 16:26:56 2004 UTC (19 years, 10 months ago) by claudio
Branch: MAIN
Changes since 1.24: +7 -7 lines
Diff to previous 1.24 (colored)

struct prefix has a pointer to the peer so use it everywhere directly instead
of the detour via aspath.

Revision 1.24 / (download) - annotate - [select for diffs], Fri Jul 30 14:44:30 2004 UTC (19 years, 10 months ago) by claudio
Branch: MAIN
Changes since 1.23: +80 -15 lines
Diff to previous 1.23 (colored)

Add new announce type "default-route" which will only announce the default
route to the specified neighbor. Idea and OK henning@

Revision 1.23 / (download) - annotate - [select for diffs], Tue Jul 13 17:57:20 2004 UTC (19 years, 10 months ago) by jaredy
Branch: MAIN
Changes since 1.22: +3 -3 lines
Diff to previous 1.22 (colored)

fix some typos

ok henning otto

Revision 1.22 / (download) - annotate - [select for diffs], Mon Jul 5 02:13:44 2004 UTC (19 years, 11 months ago) by henning
Branch: MAIN
Changes since 1.21: +2 -2 lines
Diff to previous 1.21 (colored)

fix a few KNF fallouts

Revision 1.21 / (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.20: +28 -12 lines
Diff to previous 1.20 (colored)

Cleanup. jajaja henning@

Revision 1.20 / (download) - annotate - [select for diffs], Tue Jun 22 20:28:58 2004 UTC (19 years, 11 months ago) by claudio
Branch: MAIN
Changes since 1.19: +8 -5 lines
Diff to previous 1.19 (colored)

Make the RDE IPv6 ready missing is the message handling. The internal
prefix tree changed form a hash table to a per AF RB tree.
OK henning@ some ideas are from Brent Graveland.

Revision 1.19 / (download) - annotate - [select for diffs], Sun Jun 20 18:35:12 2004 UTC (19 years, 11 months ago) by henning
Branch: MAIN
Changes since 1.18: +2 -2 lines
Diff to previous 1.18 (colored)

at least somewhat consistently name the TAILQ_ENTRYs... this confused me
more than once

Revision 1.18 / (download) - annotate - [select for diffs], Fri May 21 15:36:40 2004 UTC (20 years ago) by claudio
Branch: MAIN
Changes since 1.17: +80 -18 lines
Diff to previous 1.17 (colored)

RFC 2796 bgp route reflector support. This is very useful in conjunction
with templates. looks good, go for it henning@

Revision 1.17 / (download) - annotate - [select for diffs], Fri Apr 30 05:47:50 2004 UTC (20 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.16: +2 -2 lines
Diff to previous 1.16 (colored)

spelling

Revision 1.16 / (download) - annotate - [select for diffs], Sat Mar 20 23:17:35 2004 UTC (20 years, 2 months ago) by david
Branch: MAIN
CVS Tags: OPENBSD_3_5_BASE, OPENBSD_3_5
Changes since 1.15: +3 -3 lines
Diff to previous 1.15 (colored)

comment spelling fixes; ok henning@

Revision 1.15 / (download) - annotate - [select for diffs], Fri Mar 19 10:30:15 2004 UTC (20 years, 2 months ago) by claudio
Branch: MAIN
Changes since 1.14: +17 -3 lines
Diff to previous 1.14 (colored)

Fix memory leak in error path. Found by Patrick Latifi. OK henning@

Revision 1.14 / (download) - annotate - [select for diffs], Thu Mar 11 17:12:51 2004 UTC (20 years, 2 months ago) by claudio
Branch: MAIN
Changes since 1.13: +36 -8 lines
Diff to previous 1.13 (colored)

Add basic support for communities. Currently it is only possible to filter
on communities, e.g match from any community 24640:* set localpref 666
OK henning@

Revision 1.13 / (download) - annotate - [select for diffs], Tue Mar 9 13:51:16 2004 UTC (20 years, 2 months ago) by claudio
Branch: MAIN
Changes since 1.12: +19 -5 lines
Diff to previous 1.12 (colored)

When a new prefix is filtered it is necessary to remove the old prefix.
This is done by a recursive call that does the withdraw. OK henning@

Revision 1.12 / (download) - annotate - [select for diffs], Thu Mar 4 11:26:36 2004 UTC (20 years, 3 months ago) by henning
Branch: MAIN
Changes since 1.11: +5 -5 lines
Diff to previous 1.11 (colored)

no ; after RB_PROTOTYPE / RB_GENERATE
From: Andrey Matveev <andrushock@korovino.net>

Revision 1.11 / (download) - annotate - [select for diffs], Tue Mar 2 19:27:37 2004 UTC (20 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.10: +3 -3 lines
Diff to previous 1.10 (colored)

Use ntohl() to compare in_addr_t so the tree is nicely sorted.

Revision 1.10 / (download) - annotate - [select for diffs], Mon Mar 1 23:07:09 2004 UTC (20 years, 3 months ago) by deraadt
Branch: MAIN
Changes since 1.9: +2 -2 lines
Diff to previous 1.9 (colored)

spelling

Revision 1.9 / (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.8: +6 -6 lines
Diff to previous 1.8 (colored)

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

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

Announce local networks to IBGP neighbors. OK henning@

Revision 1.7 / (download) - annotate - [select for diffs], Tue Feb 24 14:27:27 2004 UTC (20 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.6: +19 -3 lines
Diff to previous 1.6 (colored)

It is possible that a queued path attribute has no nlri prefix. Ignore and
remove those path attributes before using them in an UPDATE. OK henning@

Revision 1.6 / (download) - annotate - [select for diffs], Thu Feb 19 23:07:00 2004 UTC (20 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.5: +28 -4 lines
Diff to previous 1.5 (colored)

Add support for basic filters. Nothing optimized and it has some issues but
this is a huge step forward. OK henning@

Revision 1.5 / (download) - annotate - [select for diffs], Wed Feb 18 23:25:17 2004 UTC (20 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.4: +19 -1 lines
Diff to previous 1.4 (colored)

Do aspath loop detecion for outgoing messages too, but this time with the
remote peer as. OK henning@

Revision 1.4 / (download) - annotate - [select for diffs], Wed Feb 18 16:14:13 2004 UTC (20 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.3: +14 -16 lines
Diff to previous 1.3 (colored)

Fix a nasty memory leak. OK henning@

Revision 1.3 / (download) - annotate - [select for diffs], Tue Feb 17 15:44:02 2004 UTC (20 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.2: +2 -2 lines
Diff to previous 1.2 (colored)

Make gcc on sparc happy. OK henning@

Revision 1.2 / (download) - annotate - [select for diffs], Mon Feb 9 01:56:18 2004 UTC (20 years, 3 months ago) by henning
Branch: MAIN
Changes since 1.1: +2 -2 lines
Diff to previous 1.1 (colored)

replace a bunch of u_long by u_int32_t

Revision 1.1 / (download) - annotate - [select for diffs], Wed Feb 4 09:07:44 2004 UTC (20 years, 4 months ago) by claudio
Branch: MAIN

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

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.