Thanks to visit codestin.com
Credit goes to cvsweb.openbsd.org

OpenBSD CVS

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


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.18 / (download) - annotate - [select for diffs], Mon Mar 10 14:11:38 2025 UTC (6 months, 2 weeks ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_7_BASE, OPENBSD_7_7, HEAD
Changes since 1.17: +4 -3 lines
Diff to previous 1.17 (colored)

Remove some includes from bgpd.h (poll.h and arpa/inet.h) and place them
into the files that really need them. Also remove stdarg.h since nothing
in bgpd.h needs that.

Revision 1.17 / (download) - annotate - [select for diffs], Wed Dec 28 21:30:16 2022 UTC (2 years, 8 months ago) by jmc
Branch: MAIN
CVS Tags: OPENBSD_7_6_BASE, OPENBSD_7_6, OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3
Changes since 1.16: +4 -4 lines
Diff to previous 1.16 (colored)

spelling fixes; from paul tagliamonte
any parts of his diff not taken are noted on tech

Revision 1.16 / (download) - annotate - [select for diffs], Wed Aug 31 11:25:36 2022 UTC (3 years ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2
Changes since 1.15: +2 -1 lines
Diff to previous 1.15 (colored)

Make sure that only one roa softreconfig runner is run at any time.
If a run takes to long drop the current update and wait for the next update.
OK benno@

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

whitespaces found when I went checking for something else

Revision 1.14 / (download) - annotate - [select for diffs], Sun Feb 6 09:51:19 2022 UTC (3 years, 7 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_1_BASE, OPENBSD_7_1
Changes since 1.13: +27 -27 lines
Diff to previous 1.13 (colored)

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

Revision 1.13 / (download) - annotate - [select for diffs], Fri Jan 28 10:37:23 2022 UTC (3 years, 7 months ago) by claudio
Branch: MAIN
Changes since 1.12: +3 -3 lines
Diff to previous 1.12 (colored)

Must use unsigned 1 here since modern compilers can't shift a signed 1 by 31.
OK tb@ kettenis@

Revision 1.12 / (download) - annotate - [select for diffs], Wed Dec 30 07:29:56 2020 UTC (4 years, 8 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9
Changes since 1.11: +7 -1 lines
Diff to previous 1.11 (colored)

Implement IMSG_CTL_SHOW_SET to get information about roa-set, as-sets and
prefix-sets loaded into the RDE. For now only the number of prefixes or
asnumbers are shown plus the time since the last change was done to the table.
OK benno@

Revision 1.11 / (download) - annotate - [select for diffs], Tue Dec 29 15:30:34 2020 UTC (4 years, 8 months ago) by claudio
Branch: MAIN
Changes since 1.10: +24 -12 lines
Diff to previous 1.10 (colored)

In preparation for RTR support change the representation of the roa-set
in the parent to a simple RB tree based on struct roa. With this overlapping
ROAs (same prefix & source-as but different maxlen) are now merged in the RDE
when the lookup trie is constructed.
OK benno@

Revision 1.10 / (download) - annotate - [select for diffs], Fri Oct 26 16:53:55 2018 UTC (6 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, OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.9: +13 -1 lines
Diff to previous 1.9 (colored)

Track the amount of memory used for sets and tries (aka anything-set)
OK deraadt@

Revision 1.9 / (download) - annotate - [select for diffs], Sat Sep 29 08:11:11 2018 UTC (6 years, 11 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.8: +12 -12 lines
Diff to previous 1.8 (colored)

Implement origin validation in bgpd. This introduces two new tables, the
roa-set for RPKI based origin validation and a origin-set which allows to
lookup a source-as / prefix pair.
For RPKI a config can be built like this:
  roa-set {
          165.254.255.0/24 source-as 15562
          193.0.0.0/21 maxlen 24 source-as 3333
  }
  deny from any ovs invalid
  match from any ovs valid set community local-as:42
  match from any ovs not-found set community local-as:43
Origin sets are similar but only match when the source-as / prefix pair is
valid.
  match from any origin-set ARINDB set community local-as:44
Committing this now so that further work can be done in tree.
OK benno@, job@

Revision 1.8 / (download) - annotate - [select for diffs], Wed Sep 26 14:47:20 2018 UTC (6 years, 11 months ago) by claudio
Branch: MAIN
Changes since 1.7: +4 -3 lines
Diff to previous 1.7 (colored)

Use the same logic in trie_roa_check_v4 as in trie_roa_check_v6 when
checking that a source_as / maxlen combo actually fits.
Fixes regress test.

Revision 1.7 / (download) - annotate - [select for diffs], Thu Sep 20 11:45:59 2018 UTC (7 years ago) by claudio
Branch: MAIN
Changes since 1.6: +21 -15 lines
Diff to previous 1.6 (colored)

Split up as_set into a set_table and an as_set. The first is what does
the lookup and will now also be used in roa-set tries. The as_set is glue
to add the name and dirty flag. Add an accessor to get the set data so
that the imsg sending and printing can be moved into the right places.
This is done mainly because roa-sets need similar but slightly different
versions and making the code more generic is the best way fixing this.
OK benno@

Revision 1.6 / (download) - annotate - [select for diffs], Tue Sep 18 15:14:07 2018 UTC (7 years ago) by claudio
Branch: MAIN
Changes since 1.5: +233 -72 lines
Diff to previous 1.5 (colored)

Backend for roa-sets. This combines as_sets and prefix-set tries to do
proper ROA checking. There is a new match function trie_roa_check which
does a trie traversal and looks for candidates and matches. If prefix
is not covered then ROA_UNKNOWN is returned, if prefix is covered by an
entry it will return ROA_INVALID unless the source-as / maxlen combo is
matching (ROA_VALID).
OK and input sthen@

Revision 1.5 / (download) - annotate - [select for diffs], Mon Sep 10 13:15:50 2018 UTC (7 years ago) by denis
Branch: MAIN
Changes since 1.4: +7 -7 lines
Diff to previous 1.4 (colored)

fix typos

OK claudio@

Revision 1.4 / (download) - annotate - [select for diffs], Sat Sep 8 15:25:27 2018 UTC (7 years ago) by benno
Branch: MAIN
Changes since 1.3: +17 -6 lines
Diff to previous 1.3 (colored)

implement or-longer filter op for prefix-sets. Allows one two write rules like
  deny from any prefix-set mynetworks or-longer
ok claudio, feature discussed with job and deraadt

Revision 1.3 / (download) - annotate - [select for diffs], Fri Sep 7 20:26:30 2018 UTC (7 years ago) by claudio
Branch: MAIN
Changes since 1.2: +10 -10 lines
Diff to previous 1.2 (colored)

The debug function trie_dump() should use stderr since that does not case
that much problem with the regress test which writes its stuff on stdout.

Revision 1.2 / (download) - annotate - [select for diffs], Fri Sep 7 13:25:36 2018 UTC (7 years ago) by claudio
Branch: MAIN
Changes since 1.1: +2 -2 lines
Diff to previous 1.1 (colored)

Add missing htonl() else matching does not really work.

Revision 1.1 / (download) - annotate - [select for diffs], Fri Sep 7 10:49:22 2018 UTC (7 years ago) by claudio
Branch: MAIN

Implement a fast presix-set lookup. This magic trie is able to match a
prefix addr/plen to a prefix-set spec addr/plen prefixlen min - max (a
prefix including prefixlen range). Every addr/plen pair is a node in the
trie and the prefixlen is added as a bitmask to those nodes.
For the lookup the any match is OK, there is no need to do longest or
best prefix matching.
Inspiration for this solution comes from the way bird implements this
which was done by Ondrej Zajicek santiago (at) crfreenet.org
OK benno@

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.