OpenBSD CVS

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


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.134 / (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_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, HEAD
Changes since 1.133: +1 -37 lines
Diff to previous 1.133 (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.133 / (download) - annotate - [select for diffs], Mon Jun 12 12:10:17 2023 UTC (11 months, 3 weeks ago) by claudio
Branch: MAIN
Changes since 1.132: +2 -2 lines
Diff to previous 1.132 (colored)

Use data != NULL to be more explicit. No functional change.
OK tb@

Revision 1.132 / (download) - annotate - [select for diffs], Wed Dec 14 12:37:15 2022 UTC (17 months, 3 weeks ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_3_BASE, OPENBSD_7_3
Changes since 1.131: +1 -19 lines
Diff to previous 1.131 (colored)

Move some basic accessors of aspath to rde.h and make them static inline.
OK tb@

Revision 1.131 / (download) - annotate - [select for diffs], Thu Sep 1 13:19:11 2022 UTC (21 months, 1 week ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2
Changes since 1.130: +1 -2 lines
Diff to previous 1.130 (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.130 / (download) - annotate - [select for diffs], Wed Aug 31 14:29:36 2022 UTC (21 months, 1 week ago) by claudio
Branch: MAIN
Changes since 1.129: +21 -106 lines
Diff to previous 1.129 (colored)

Switch the generic attribute cache to an RB tree.
OK benno@ tb@

Revision 1.129 / (download) - annotate - [select for diffs], Mon Aug 29 18:18:55 2022 UTC (21 months, 1 week ago) by claudio
Branch: MAIN
Changes since 1.128: +36 -125 lines
Diff to previous 1.128 (colored)

Instead of a global aspath cache copy the aspath attribute per rde_aspath
struct. It uses a bit more memory but improves performance a lot on really
big systems because aspath_get() becomes a very hot function.
OK tb@

Revision 1.128 / (download) - annotate - [select for diffs], Mon Aug 29 18:04:51 2022 UTC (21 months, 1 week ago) by claudio
Branch: MAIN
Changes since 1.127: +11 -11 lines
Diff to previous 1.127 (colored)

Use fatal("%s", __func__); instead of fatal("function_name");
OK tb@

Revision 1.127 / (download) - annotate - [select for diffs], Thu Jul 28 13:11:51 2022 UTC (22 months, 1 week ago) by deraadt
Branch: MAIN
Changes since 1.126: +3 -3 lines
Diff to previous 1.126 (colored)

whitespace found during a read-thru; ok claudio

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

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

Revision 1.125 / (download) - annotate - [select for diffs], Thu Jun 24 10:04:05 2021 UTC (2 years, 11 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0
Changes since 1.124: +1 -3 lines
Diff to previous 1.124 (colored)

aspath_deflate() did free the passed in data but since the way aspaths
are processed in the Adj-RIB-Out this is no longer needed since the passed
in pointer is still referenced and is not allowed to be freed.
Adjust the mrt code similar to how up_generate_attr() uses aspath_deflate().
OK sthen@

Revision 1.124 / (download) - annotate - [select for diffs], Sat Jan 16 13:14:54 2021 UTC (3 years, 4 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE, OPENBSD_6_9
Changes since 1.123: +8 -3 lines
Diff to previous 1.123 (colored)

aspath_neighbor() needs to return the local system AS for empty AS paths
but also for AS paths starting with an AS_SET segment. RFC4271 wants this
and it also makes sense for all the cases where aspath_neighbor() is used
in bgpd.
OK denis@ job@

Revision 1.123 / (download) - annotate - [select for diffs], Mon Jun 24 06:39:49 2019 UTC (4 years, 11 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.122: +2 -2 lines
Diff to previous 1.122 (colored)

mrt dumps lost communities after the community rewrite.
Readd them by dumping them explicitly.
Tested by and OK benno@

Revision 1.122 / (download) - annotate - [select for diffs], Mon Jun 17 11:02:19 2019 UTC (4 years, 11 months ago) by claudio
Branch: MAIN
Changes since 1.121: +7 -768 lines
Diff to previous 1.121 (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.121 / (download) - annotate - [select for diffs], Tue Feb 26 12:46:08 2019 UTC (5 years, 3 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.120: +8 -1 lines
Diff to previous 1.120 (colored)

Add missing break; in case statement and while there check that the
filter_community type is valid. Found while looking into a gcc warning
about uninitialized data.

Revision 1.120 / (download) - annotate - [select for diffs], Tue Feb 26 12:33:40 2019 UTC (5 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.119: +4 -4 lines
Diff to previous 1.119 (colored)

Some betoh64 sneaked in again, change to be64toh to be posix compliant.

Revision 1.119 / (download) - annotate - [select for diffs], Tue Feb 26 10:49:15 2019 UTC (5 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.118: +194 -79 lines
Diff to previous 1.118 (colored)

Add support for '*', local-as and neighbor-as for ext-community matching
and setting. This allows rules like:
    ext-community * * # delete any ext-community
    ext-community ovs * # delete any ext-community of specified type
    ext-community rt 1.2.3.4:*
and
    ext-community rt 65001:local-as
    ext-community rt local-as:11111

Note: Sometimes the type of the ext-community is underspecified when using
wildchars or expands.  So 'ext-community rt *' or 'ext-community soo *' will
match for any of the 3 possible types (2-byte AS, 4-byte AS and IP address).
If local-as/neighbor-as is used as an expand of as-number like
    ext-community rt local-as:11111
then bgpd will default to the 4-byte AS type to encode the community.

OK benno@

Revision 1.118 / (download) - annotate - [select for diffs], Fri Feb 15 09:55:21 2019 UTC (5 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.117: +2 -2 lines
Diff to previous 1.117 (colored)

Use the posix version of betoh64() which is spelled be64toh() this is more
portable.

Revision 1.117 / (download) - annotate - [select for diffs], Fri Feb 15 09:51:41 2019 UTC (5 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.116: +2 -1 lines
Diff to previous 1.116 (colored)

Another missing endian.h

Revision 1.116 / (download) - annotate - [select for diffs], Mon Feb 4 18:53:10 2019 UTC (5 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.115: +47 -1 lines
Diff to previous 1.115 (colored)

Implement as-override, a feature where the neighbor AS is replaced by the
local AS in AS paths. This is sometimes needed in bigger transport networks
where private AS numbers are used in multiple locations.
The implementation is done using a filterset which modifies the AS path -
somewhat inspired by the set attribute code. Setting as-override yes will add
    match from <neighbor> set { as-override }
to the start of the filter rules. Since this is filters the Adj-RIB-In still
holds the original path and so reloads changing the setting just work.
With and OK markus@

Revision 1.115 / (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.114: +98 -112 lines
Diff to previous 1.114 (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.114 / (download) - annotate - [select for diffs], Tue Dec 11 09:02:14 2018 UTC (5 years, 5 months ago) by claudio
Branch: MAIN
Changes since 1.113: +159 -46 lines
Diff to previous 1.113 (colored)

Refactor aspath code a bit. Move cached source_as (for origin validation)
into struct aspath and pass that struct to aspath_match().
OK denis@

Revision 1.113 / (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.112: +139 -56 lines
Diff to previous 1.112 (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.112 / (download) - annotate - [select for diffs], Wed Oct 10 06:21:47 2018 UTC (5 years, 8 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.111: +3 -2 lines
Diff to previous 1.111 (colored)

Large community setting, when checking for pre-existing community, was
comparing with byte-order swapped, therefore it could add duplicates.
ok claudio

Revision 1.111 / (download) - annotate - [select for diffs], Sat Sep 29 08:11:11 2018 UTC (5 years, 8 months ago) by claudio
Branch: MAIN
Changes since 1.110: +41 -6 lines
Diff to previous 1.110 (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.110 / (download) - annotate - [select for diffs], Thu Sep 20 11:06:04 2018 UTC (5 years, 8 months ago) by benno
Branch: MAIN
Changes since 1.109: +3 -4 lines
Diff to previous 1.109 (colored)

whitespace cleanup, ok claudio@

Revision 1.109 / (download) - annotate - [select for diffs], Fri Aug 10 11:15:53 2018 UTC (5 years, 10 months ago) by claudio
Branch: MAIN
Changes since 1.108: +7 -3 lines
Diff to previous 1.108 (colored)

Another place where we should handle AS_SET better. aspath_lenmatch()
should count through AS_SET boundaries, in other words the path
1 2 3 { 4 3 5 } 3 3 7 has an as-seq count of 4, before it was just 2.
OK benno@

Revision 1.108 / (download) - annotate - [select for diffs], Thu Aug 9 12:21:03 2018 UTC (5 years, 10 months ago) by claudio
Branch: MAIN
Changes since 1.107: +5 -5 lines
Diff to previous 1.107 (colored)

Make two very internal functions static. They are used to merge an
AS_PATH with a AS4_PATH and are therefor fairly special.

Revision 1.107 / (download) - annotate - [select for diffs], Wed Aug 8 14:29:05 2018 UTC (5 years, 10 months ago) by claudio
Branch: MAIN
Changes since 1.106: +7 -1 lines
Diff to previous 1.106 (colored)

Move struct wire_largecommunity to rde_attr.c since it is only used internally

Revision 1.106 / (download) - annotate - [select for diffs], Wed Aug 8 13:32:36 2018 UTC (5 years, 10 months ago) by claudio
Branch: MAIN
Changes since 1.105: +2 -2 lines
Diff to previous 1.105 (colored)

One ; too much

Revision 1.105 / (download) - annotate - [select for diffs], Fri Jul 13 08:18:11 2018 UTC (5 years, 10 months ago) by claudio
Branch: MAIN
Changes since 1.104: +5 -99 lines
Diff to previous 1.104 (colored)

Move aspath_verify() and aspath_inflate() into util.c so bgpctl can use them.
With this it gets a bit easier to parse MRT update messages in bgpctl.
OK benno@ phessler@

Revision 1.104 / (download) - annotate - [select for diffs], Wed Jul 11 19:05:41 2018 UTC (5 years, 10 months ago) by claudio
Branch: MAIN
Changes since 1.103: +15 -4 lines
Diff to previous 1.103 (colored)

improve the path hash function (instead of just hashing the aspath put
most other attrs into the hash as well). At the same time use the full
64 bit of SipHash in various places.
Tested by and OK benno@ phessler@

Revision 1.103 / (download) - annotate - [select for diffs], Wed Jul 11 16:34:36 2018 UTC (5 years, 10 months ago) by claudio
Branch: MAIN
Changes since 1.102: +51 -1 lines
Diff to previous 1.102 (colored)

On IMSG_CTL_SHOW_RIB_MEM also send back information of some of the
hash structures used in the RDE. Makes it fairly obvious that more
is needed in that area.
OK phessler@ benno@

Revision 1.102 / (download) - annotate - [select for diffs], Fri Jun 29 11:45:50 2018 UTC (5 years, 11 months ago) by claudio
Branch: MAIN
Changes since 1.101: +2 -2 lines
Diff to previous 1.101 (colored)

Prepare the ground for allowing temporary aspath object living on the stack.
To do this path_copy() gets a second argument (dst, src) and a new function
path_prep() is introduced to initialize an aspath object. The current
path_copy() usage is replaced with path_copy(path_get(), asp) which does
the same. Additionally some const where added to the *_copy functions to
make it more obvious which is the source and target. Also the pftable_ref()
and rtlabel_ref() functions return now the id instead of void.
OK sthen@

Revision 1.101 / (download) - annotate - [select for diffs], Mon Apr 2 19:25:33 2018 UTC (6 years, 2 months ago) by claudio
Branch: MAIN
Changes since 1.100: +13 -5 lines
Diff to previous 1.100 (colored)

aspath_verify() can not call aspath_extract() since this function only works
on 4-byte AS path. Since this function is also called with 2-byte ASPATH
attributes. Instead inline the check using the as_size.
Problem found by Tom Beard (tom at exilien.uk), thanks for the report
OK job@

Revision 1.100 / (download) - annotate - [select for diffs], Wed May 31 10:44:00 2017 UTC (7 years ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.99: +13 -13 lines
Diff to previous 1.99 (colored)

Rework the way we do extended communities (mainly in the parser) and update
the IANA table to a somewhat more complete list. This includes BGP Prefix
Origin Validation State support via the ext-community ovs keyword.
OK henning@ benno@ based on a diff by Job Snijders

Revision 1.99 / (download) - annotate - [select for diffs], Tue May 30 18:08:15 2017 UTC (7 years ago) by benno
Branch: MAIN
Changes since 1.98: +33 -1 lines
Diff to previous 1.98 (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.98 / (download) - annotate - [select for diffs], Fri May 26 20:55:30 2017 UTC (7 years ago) by phessler
Branch: MAIN
Changes since 1.97: +8 -2 lines
Diff to previous 1.97 (colored)

AS 0 is special and should be considered an error.

Drop the session if it shows during OPEN or CAPA, or mark as invalid if
it is part of an Update.

required by RFC 7607

man page OK jmc@
OK florian@ benno@ claudio@

Revision 1.97 / (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.96: +2 -1 lines
Diff to previous 1.96 (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.96 / (download) - annotate - [select for diffs], Fri Oct 14 16:05:36 2016 UTC (7 years, 7 months ago) by phessler
Branch: MAIN
Changes since 1.95: +147 -1 lines
Diff to previous 1.95 (colored)

Add support for draft-ietf-idr-large-community

Joint work with Job Snijders, many thanks!
OK benno@ deraadt@

Revision 1.95 / (download) - annotate - [select for diffs], Sat Oct 24 08:00:42 2015 UTC (8 years, 7 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.94: +3 -5 lines
Diff to previous 1.94 (colored)

seg_type is only set but never used. So remove it. Someone reported this
long time ago.

Revision 1.94 / (download) - annotate - [select for diffs], Sun Aug 30 23:20:43 2015 UTC (8 years, 9 months ago) by deraadt
Branch: MAIN
Changes since 1.93: +4 -4 lines
Diff to previous 1.93 (colored)

rename a variable "err" to "error"

Revision 1.93 / (download) - annotate - [select for diffs], Fri Dec 12 18:15:51 2014 UTC (9 years, 5 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.92: +26 -13 lines
Diff to previous 1.92 (colored)

convert some hash tables (the easy ones) to siphash. ok benno.

Revision 1.92 / (download) - annotate - [select for diffs], Wed Oct 8 16:15:37 2014 UTC (9 years, 8 months ago) by deraadt
Branch: MAIN
Changes since 1.91: +7 -7 lines
Diff to previous 1.91 (colored)

Use reallocarray() throughout to spot multiplicative int overflow.
ok henning benno

Revision 1.90.2.1 / (download) - annotate - [select for diffs], Thu Nov 29 20:06:16 2012 UTC (11 years, 6 months ago) by sthen
Branch: OPENBSD_5_2
Changes since 1.90: +5 -3 lines
Diff to previous 1.90 (colored) next main 1.91 (colored)

MFC fix for interoperability problem with some newer Junipers which don't
clear reserved bits:

-- -- --
By default mask the reserved bits and the ext len bit in the attribute
flags field. Some systems seem to start sending bad flags around which
cause session failures in bgpd. Make sure that bgpd ignores the must be
zero flags correctly and ensure that they are always reset to zero when
sending updates out.
Reported and patch tested by Laurent CARON, OK henning@

Members:
        rde.c:1.316->1.317
        rde.h:1.142->1.143
        rde_attr.c:1.90->1.91
-- -- --

Revision 1.91 / (download) - annotate - [select for diffs], Sun Aug 12 14:24:56 2012 UTC (11 years, 9 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5, OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.90: +5 -3 lines
Diff to previous 1.90 (colored)

By default mask the reserved bits and the ext len bit in the attribute
flags field. Some systems seem to start sending bad flags around which
cause session failures in bgpd. Make sure that bgpd ignores the must be
zero flags correctly and ensure that they are always reset to zero when
sending updates out.
Reported and patch tested by Laurent CARON, OK henning@

Revision 1.90 / (download) - annotate - [select for diffs], Thu Apr 12 17:27:20 2012 UTC (12 years, 1 month ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE
Branch point for: OPENBSD_5_2
Changes since 1.89: +3 -9 lines
Diff to previous 1.89 (colored)

aspath_neighbor() should return the local AS number for empty AS pathes.
OK henning@ sthen@

Revision 1.89 / (download) - annotate - [select for diffs], Tue Sep 20 21:19:06 2011 UTC (12 years, 8 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1
Changes since 1.88: +1 -62 lines
Diff to previous 1.88 (colored)

Move a few functions into util.c because bgpctl will need them soon.

Revision 1.88 / (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_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.87: +2 -1 lines
Diff to previous 1.87 (colored)

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

ok deraadt@, millert@

Revision 1.87 / (download) - annotate - [select for diffs], Thu Nov 18 12:18:31 2010 UTC (13 years, 6 months ago) by claudio
Branch: MAIN
Changes since 1.86: +12 -3 lines
Diff to previous 1.86 (colored)

Accept but ignore (treat as withdraw) updates with AS_CONFED_* path
segments. Bgpd does not support confederations but it is too extreme
to close a session because a path contained such elements.
OK henning@, sthen@

Revision 1.86 / (download) - annotate - [select for diffs], Fri Oct 22 12:37:32 2010 UTC (13 years, 7 months ago) by claudio
Branch: MAIN
Changes since 1.85: +5 -2 lines
Diff to previous 1.85 (colored)

Free attributes that just got allocated beforehands and do not hold any
reference in case attr_optadd() errors out.
Found by and diff provided by Igor Zinovik, OK henning@

Revision 1.85 / (download) - annotate - [select for diffs], Wed May 26 13:56:07 2010 UTC (14 years ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.84: +4 -4 lines
Diff to previous 1.84 (colored)

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

ok henning gilles claudio jacekm deraadt

Revision 1.84 / (download) - annotate - [select for diffs], Mon May 17 16:08:20 2010 UTC (14 years ago) by claudio
Branch: MAIN
Changes since 1.83: +38 -1 lines
Diff to previous 1.83 (colored)

Implement two new filters, max-as-len and max-as-seq. The first is limiting
the length of an AS path (matches if the path is longer then the specified
lenght) the second matches when a sequence of the same AS number is longer
then the specified length).
max-as-len is good to protect crappy comercial bgp boxes from other crappy
comercial bgp boxes. max-as-seq was a feature request from SwissIX and maybe
EuroIX to find and filter prepends.
Additinal testing and OK sthen@

Revision 1.83 / (download) - annotate - [select for diffs], Mon Mar 29 09:24:07 2010 UTC (14 years, 2 months ago) by claudio
Branch: MAIN
Changes since 1.82: +1 -2 lines
Diff to previous 1.82 (colored)

I'm going to need community_ext_conv() outside of rde_attr.c soon, so move
the prototype to rde.h

Revision 1.82 / (download) - annotate - [select for diffs], Fri Mar 5 15:25:00 2010 UTC (14 years, 3 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.81: +108 -5 lines
Diff to previous 1.81 (colored)

Allow to filter for ext-community attributes. Currently only perfect matches
work but that's already better then nothing. OK sthen@

Revision 1.81 / (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.80: +12 -5 lines
Diff to previous 1.80 (colored)

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

Revision 1.80 / (download) - annotate - [select for diffs], Wed Dec 16 15:40:55 2009 UTC (14 years, 5 months ago) by claudio
Branch: MAIN
Changes since 1.79: +148 -8 lines
Diff to previous 1.79 (colored)

Implement "set ext-community [delete] subtype key:value" to set and delete
extended communities as specified in RFC 4360. No matching implemented yet
and stuff like * and neighbor-as are neither supported but will be soon.
Looks good henning & sthen, manpage fixed by jmc

Revision 1.79 / (download) - annotate - [select for diffs], Thu Mar 19 06:52:59 2009 UTC (15 years, 2 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.78: +26 -1 lines
Diff to previous 1.78 (colored)

Implement a attr_writebuf() function that works on a struct buf instead of
a pre allocated piece of memory. Will be used by newer mrt code.
OK henning@

Revision 1.75.4.1 / (download) - annotate - [select for diffs], Wed Feb 18 20:32:08 2009 UTC (15 years, 3 months ago) by claudio
Branch: OPENBSD_4_3
Changes since 1.75: +7 -2 lines
Diff to previous 1.75 (colored) next main 1.76 (colored)

MFC rev 1.78
Fix aspath_prepend() in the case a AS-PATH has a sequence of 255 elements
and we try to prepend. The result was a corrupt AS-PATH and a RDE fatal
later on when some other operation was run on that path.
Found the hard way by henning@ and sthen@. OK henning@, sthen@

Revision 1.76.2.1 / (download) - annotate - [select for diffs], Wed Feb 18 20:30:36 2009 UTC (15 years, 3 months ago) by claudio
Branch: OPENBSD_4_4
Changes since 1.76: +7 -2 lines
Diff to previous 1.76 (colored) next main 1.77 (colored)

MFC rev 1.78
Fix aspath_prepend() in the case a AS-PATH has a sequence of 255 elements
and we try to prepend. The result was a corrupt AS-PATH and a RDE fatal
later on when some other operation was run on that path.
Found the hard way by henning@ and sthen@. OK henning@, sthen@

Revision 1.78 / (download) - annotate - [select for diffs], Tue Feb 17 14:10:48 2009 UTC (15 years, 3 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_5_BASE, OPENBSD_4_5
Changes since 1.77: +7 -2 lines
Diff to previous 1.77 (colored)

Fix aspath_prepend() in the case a AS-PATH has a sequence of 255 elements
and we try to prepend. The result was a corrupt AS-PATH and a RDE fatal
later on when some other operation was run on that path.
Found the hard way by henning@ and sthen@. OK henning@, sthen@

Revision 1.77 / (download) - annotate - [select for diffs], Tue Jan 13 21:35:16 2009 UTC (15 years, 4 months ago) by sthen
Branch: MAIN
Changes since 1.76: +2 -2 lines
Diff to previous 1.76 (colored)

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

ok claudio

Revision 1.76 / (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_4_BASE
Branch point for: OPENBSD_4_4
Changes since 1.75: +2 -2 lines
Diff to previous 1.75 (colored)

KNF

Revision 1.75 / (download) - annotate - [select for diffs], Tue May 22 14:03:31 2007 UTC (17 years ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_3_BASE, OPENBSD_4_2_BASE, OPENBSD_4_2
Branch point for: OPENBSD_4_3
Changes since 1.74: +2 -2 lines
Diff to previous 1.74 (colored)

Only try to merge a AS_SEQUENCE if there is a difference between the 4-byte
AS path and the 2-byte version. If both pathes have the same length don't
try to merge them instead use the new path.
Issue reported by Jon Morby and further analysed by Stuart Henderson.
Tested by Stuart Henderson.

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

Various spelling fixes from Stuart Henderson.

Revision 1.73 / (download) - annotate - [select for diffs], Mon Apr 30 11:41:53 2007 UTC (17 years, 1 month ago) by claudio
Branch: MAIN
Changes since 1.72: +7 -7 lines
Diff to previous 1.72 (colored)

Better error messages.

Revision 1.72 / (download) - annotate - [select for diffs], Mon Apr 30 11:37:15 2007 UTC (17 years, 1 month ago) by claudio
Branch: MAIN
Changes since 1.71: +2 -2 lines
Diff to previous 1.71 (colored)

Fix a bad check in aspath_inflate() -- compare with the correct loop value.

Revision 1.71 / (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.70: +270 -47 lines
Diff to previous 1.70 (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.70 / (download) - annotate - [select for diffs], Tue Mar 6 16:52:48 2007 UTC (17 years, 3 months ago) by henning
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.69: +12 -4 lines
Diff to previous 1.69 (colored)

allow filtering on peer-as (leftmost AS in path), ok claudio

Revision 1.69 / (download) - annotate - [select for diffs], Thu Feb 22 08:34:18 2007 UTC (17 years, 3 months ago) by henning
Branch: MAIN
Changes since 1.68: +2 -2 lines
Diff to previous 1.68 (colored)

KNF

Revision 1.68 / (download) - annotate - [select for diffs], Thu Dec 21 15:25:19 2006 UTC (17 years, 5 months ago) by claudio
Branch: MAIN
Changes since 1.67: +4 -1 lines
Diff to previous 1.67 (colored)

Check for overflow of others_len. This can not happen at the moment because
less than 255 attributes can be allocated at max. OK claudio@

Revision 1.67 / (download) - annotate - [select for diffs], Mon Dec 18 19:16:59 2006 UTC (17 years, 5 months ago) by henning
Branch: MAIN
Changes since 1.66: +4 -2 lines
Diff to previous 1.66 (colored)

avoid p = realloc(p idiom, ok claudio, spotted deraadt

Revision 1.66 / (download) - annotate - [select for diffs], Sat May 27 15:39:56 2006 UTC (18 years ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.65: +14 -11 lines
Diff to previous 1.65 (colored)

Unfuck community delete. The if () statement to match communities was FUBAR
instead reverse logic and use the same if statement as in the match function.
Issue found and debugged by Leen Besselink. Thanks.

Revision 1.63.2.1 / (download) - annotate - [select for diffs], Thu May 4 22:22:33 2006 UTC (18 years, 1 month ago) by brad
Branch: OPENBSD_3_9
Changes since 1.63: +3 -1 lines
Diff to previous 1.63 (colored) next main 1.64 (colored)

MFC:
Fix by claudio@

Fix a memory leak when communities are set or deleted. This seems to fix
Sylvain Coutant memory issues. A lot of patience and testing by Sylvain.

ok claudio@ deraadt@

Revision 1.65 / (download) - annotate - [select for diffs], Wed Apr 12 14:05:46 2006 UTC (18 years, 2 months ago) by claudio
Branch: MAIN
Changes since 1.64: +1 -3 lines
Diff to previous 1.64 (colored)

It is no longer allowed to change attributes in place. This corrupts the
attribute cache. Instead remove attribute and readd it after beeing changed.
This should fix the "att_diff: equal attributes encountered" error seen by
Tony Sarendal. OK henning@

Revision 1.64 / (download) - annotate - [select for diffs], Wed Mar 15 11:26:45 2006 UTC (18 years, 2 months ago) by claudio
Branch: MAIN
Changes since 1.63: +3 -1 lines
Diff to previous 1.63 (colored)

Fix a memory leak when communities are set or deleted. This seems to fix
Sylvain Coutant memory issues. A lot of patience and testing by Sylvain.

Revision 1.63 / (download) - annotate - [select for diffs], Thu Feb 9 21:05:09 2006 UTC (18 years, 4 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE
Branch point for: OPENBSD_3_9
Changes since 1.62: +62 -2 lines
Diff to previous 1.62 (colored)

Implement "set community delete 65001:*" and friends. This will remove
communities from the path attributes. Useful to make sure that the ones you
set later are set by a (evil) peer.  OK henning@

Revision 1.62 / (download) - annotate - [select for diffs], Thu Feb 9 20:54:56 2006 UTC (18 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.61: +2 -2 lines
Diff to previous 1.61 (colored)

When comparing community type, cast to u_int16_t. The same is done for the
AS. OK henning@

Revision 1.61 / (download) - annotate - [select for diffs], Thu Feb 9 20:50:09 2006 UTC (18 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.60: +9 -6 lines
Diff to previous 1.60 (colored)

attr_free() should not modify others_len as it does not resize the others
array. It just clears on entry by setting it to NULL and moving that NULL
to the end of the array. With this it will be possible to remove attributes
without readding them right afterwards. Because of this attr_diff() needs to
be more careful because of passed NULL pointers. OK henning@

Revision 1.60 / (download) - annotate - [select for diffs], Fri Jan 20 15:34:55 2006 UTC (18 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.59: +7 -2 lines
Diff to previous 1.59 (colored)

No need to calloc() others if others_len is 0. The 0 malloc() does not hurt
(we do not access it) but does not help either. Finally it reduces head
scratching when debugging the RIB. OK henning@

Revision 1.59 / (download) - annotate - [select for diffs], Fri Jan 20 15:14:40 2006 UTC (18 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.58: +2 -2 lines
Diff to previous 1.58 (colored)

Doh. > not < and attr_compare() starts to work correctly. OK henning@

Revision 1.58 / (download) - annotate - [select for diffs], Tue Jan 10 16:11:12 2006 UTC (18 years, 5 months ago) by claudio
Branch: MAIN
Changes since 1.57: +53 -17 lines
Diff to previous 1.57 (colored)

The attributes cache broke the set community filterset because community_set()
modified the attribute data directly and corrupted the cache by doing it.
It is no longer allowed to modify attributes via attr_optget() -> change
attr->data. Instead remove the old attribute from the aspath and then add
a new modifed one again. Included in this change is the removal of a "feature"
that allowed only one community per AS. If you had problems to add multiple
communities via filters then this was the problem. Looks good Henning.

Revision 1.57 / (download) - annotate - [select for diffs], Tue Jan 10 16:03:11 2006 UTC (18 years, 5 months ago) by claudio
Branch: MAIN
Changes since 1.56: +6 -2 lines
Diff to previous 1.56 (colored)

In attr_diff() compare the attributes flags too. They may be different and
especially they are accounted in the hash. While there change a 0 to NULL.

Revision 1.56 / (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.55: +227 -54 lines
Diff to previous 1.55 (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.55 / (download) - annotate - [select for diffs], Wed Jan 4 12:45:53 2006 UTC (18 years, 5 months ago) by claudio
Branch: MAIN
Changes since 1.54: +6 -1 lines
Diff to previous 1.54 (colored)

Correctly count the number of allocated BGP attributes. Needs a own counter.

Revision 1.54 / (download) - annotate - [select for diffs], Tue Jan 3 22:49:17 2006 UTC (18 years, 5 months ago) by claudio
Branch: MAIN
Changes since 1.53: +17 -2 lines
Diff to previous 1.53 (colored)

Track some (memory) statistics in the RDE. Accessible via bgpctl.

Revision 1.53 / (download) - annotate - [select for diffs], Tue Jan 3 22:19:59 2006 UTC (18 years, 5 months ago) by claudio
Branch: MAIN
Changes since 1.52: +1 -147 lines
Diff to previous 1.52 (colored)

Move functions shared with bgpctl into new file util.c. Simplifies the
link between bgpctl and bgpd mostly because of rde_attr.c.

Revision 1.52 / (download) - annotate - [select for diffs], Fri Dec 30 16:40:15 2005 UTC (18 years, 5 months ago) by claudio
Branch: MAIN
Changes since 1.51: +1 -10 lines
Diff to previous 1.51 (colored)

Remove unused attr_optlen()

Revision 1.51 / (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.50: +5 -32 lines
Diff to previous 1.50 (colored)

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

Revision 1.50 / (download) - annotate - [select for diffs], Mon Dec 19 20:10:55 2005 UTC (18 years, 5 months ago) by claudio
Branch: MAIN
Changes since 1.49: +2 -2 lines
Diff to previous 1.49 (colored)

Better English in comment.

Revision 1.49 / (download) - annotate - [select for diffs], Mon Jun 13 15:16:50 2005 UTC (19 years ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.48: +4 -3 lines
Diff to previous 1.48 (colored)

realloc(3) correctly. Do not adjust the variable describing how much memory
has been allocated until one knows the allocation has been successful.

Revision 1.48 / (download) - annotate - [select for diffs], Fri Jun 10 10:02:21 2005 UTC (19 years ago) by claudio
Branch: MAIN
Changes since 1.47: +4 -2 lines
Diff to previous 1.47 (colored)

Make sure that the ATTR_EXTLEN flag is unset if the attribute length is
smaller than 255 bytes.

Revision 1.47 / (download) - annotate - [select for diffs], Fri Jun 10 09:58:09 2005 UTC (19 years ago) by claudio
Branch: MAIN
Changes since 1.46: +10 -1 lines
Diff to previous 1.46 (colored)

Introduce attr_optlen() to get the total lenght of an optional attribute
plus header. Soon needed.

Revision 1.46 / (download) - annotate - [select for diffs], Sat Apr 16 19:56:31 2005 UTC (19 years, 1 month ago) by claudio
Branch: MAIN
Changes since 1.45: +6 -3 lines
Diff to previous 1.45 (colored)

Simplify return codes of aspath_asprint().
Return -1 on error 0 on success and make sure that in case of an error
*ret is set to NULL.

Revision 1.45 / (download) - annotate - [select for diffs], Fri Apr 15 16:19:34 2005 UTC (19 years, 1 month ago) by claudio
Branch: MAIN
Changes since 1.44: +7 -3 lines
Diff to previous 1.44 (colored)

Fix memory leak in case aspath_snprint() returns an error (-1).
OK henning@

Revision 1.44 / (download) - annotate - [select for diffs], Wed Nov 10 15:18:11 2004 UTC (19 years, 7 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_7
Changes since 1.43: +2 -2 lines
Diff to previous 1.43 (colored)

It is not needed to mask the value wit 0xff as it is < 255. OK henning@

Revision 1.43 / (download) - annotate - [select for diffs], Tue Aug 10 13:08:13 2004 UTC (19 years, 10 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_3_6_BASE, OPENBSD_3_6
Changes since 1.42: +2 -2 lines
Diff to previous 1.42 (colored)

style, use sizeof() instead of a hardcoded value.

Revision 1.42 / (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.41: +20 -548 lines
Diff to previous 1.41 (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.41 / (download) - annotate - [select for diffs], Thu Aug 5 20:56:12 2004 UTC (19 years, 10 months ago) by claudio
Branch: MAIN
Changes since 1.40: +14 -2 lines
Diff to previous 1.40 (colored)

As usual cleanup on exit. OK henning@

Revision 1.40 / (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.39: +201 -145 lines
Diff to previous 1.39 (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.39 / (download) - annotate - [select for diffs], Wed Jul 28 16:02:14 2004 UTC (19 years, 10 months ago) by claudio
Branch: MAIN
Changes since 1.38: +2 -1 lines
Diff to previous 1.38 (colored)

The default localpreference is 100 and not 0. Found and ok henning@

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

fix some typos

ok henning otto

Revision 1.37 / (download) - annotate - [select for diffs], Mon Jul 5 17:27:32 2004 UTC (19 years, 11 months ago) by claudio
Branch: MAIN
Changes since 1.36: +3 -4 lines
Diff to previous 1.36 (colored)

The rde no longer needs to check if the nexthop is the loopback address.
This is now down in the parent. OK henning@

Revision 1.36 / (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.35: +3 -3 lines
Diff to previous 1.35 (colored)

fix a few KNF fallouts

Revision 1.35 / (download) - annotate - [select for diffs], Thu Jun 24 23:15:58 2004 UTC (19 years, 11 months ago) by claudio
Branch: MAIN
Changes since 1.34: +143 -22 lines
Diff to previous 1.34 (colored)

First step at multiprotocol support, only partially done.
OK henning@

Revision 1.34 / (download) - annotate - [select for diffs], Thu Jun 24 22:01:54 2004 UTC (19 years, 11 months ago) by claudio
Branch: MAIN
Changes since 1.33: +12 -11 lines
Diff to previous 1.33 (colored)

Make community set strict aligenment save, remove unneeded ENSUREs
OK henning@ djm@

Revision 1.33 / (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.32: +33 -45 lines
Diff to previous 1.32 (colored)

Cleanup. jajaja henning@

Revision 1.32 / (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.31: +11 -11 lines
Diff to previous 1.31 (colored)

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

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

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

Revision 1.30 / (download) - annotate - [select for diffs], Mon May 17 12:39:32 2004 UTC (20 years ago) by djm
Branch: MAIN
Changes since 1.29: +31 -2 lines
Diff to previous 1.29 (colored)

extend filter language to allow basic setting of COMMUNITIES attribute.
ok claudio@

Revision 1.29 / (download) - annotate - [select for diffs], Fri May 7 10:06:15 2004 UTC (20 years, 1 month ago) by djm
Branch: MAIN
Changes since 1.28: +4 -2 lines
Diff to previous 1.28 (colored)

add a filter option to dump prefixes learned in UPDATEs into a PF table,
intended for building realtime BGP blacklists (e.g. with spamd);
ok claudio & henning

Revision 1.28 / (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.27: +2 -2 lines
Diff to previous 1.27 (colored)

spelling

Revision 1.27 / (download) - annotate - [select for diffs], Thu Apr 8 16:08:21 2004 UTC (20 years, 2 months ago) by henning
Branch: MAIN
Changes since 1.26: +2 -2 lines
Diff to previous 1.26 (colored)

swap the last two parameters to TAILQ_FOREACH_REVERSE. matches what FreeBSD
and NetBSD do.
ok millert@ mcbride@ markus@ ho@, checked to not affect ports by naddy@

Revision 1.26 / (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.25: +2 -2 lines
Diff to previous 1.25 (colored)

comment spelling fixes; ok henning@

Revision 1.25 / (download) - annotate - [select for diffs], Fri Mar 12 21:53:07 2004 UTC (20 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.24: +2 -2 lines
Diff to previous 1.24 (colored)

*size is a u_int16_t not a pointer so use 0 instead of NULL.

Revision 1.24 / (download) - annotate - [select for diffs], Fri Mar 12 21:21:39 2004 UTC (20 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.23: +8 -1 lines
Diff to previous 1.23 (colored)

bgpctl has a empty-as keyword so make this actually work. Handle AS_EMPTY
in aspath_match().

Revision 1.23 / (download) - annotate - [select for diffs], Fri Mar 12 21:14:35 2004 UTC (20 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.22: +5 -2 lines
Diff to previous 1.22 (colored)

I modified the print format for AS_SET so keep the aspath_strlen() function
in sync.

Revision 1.22 / (download) - annotate - [select for diffs], Fri Mar 12 18:09:23 2004 UTC (20 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.21: +2 -2 lines
Diff to previous 1.21 (colored)

tab at EOL

Revision 1.21 / (download) - annotate - [select for diffs], Fri Mar 12 10:52:34 2004 UTC (20 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.20: +6 -3 lines
Diff to previous 1.20 (colored)

Rewrite community_match() for loop. yaya henning@

Revision 1.20 / (download) - annotate - [select for diffs], Thu Mar 11 17:12:51 2004 UTC (20 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.19: +64 -18 lines
Diff to previous 1.19 (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.19 / (download) - annotate - [select for diffs], Thu Mar 11 16:38:23 2004 UTC (20 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.18: +6 -2 lines
Diff to previous 1.18 (colored)

Ensure that aspath_snprint() returns a zero terminated string also if the
aspath is "". Found, OK and tsc tsc tsc henning@

Revision 1.18 / (download) - annotate - [select for diffs], Fri Mar 5 22:21:32 2004 UTC (20 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.17: +20 -2 lines
Diff to previous 1.17 (colored)

Plug some memory leaks in rde. Based on a patch by Patrick Latifi.
Added attr_move() so that we can copy the attribute before calling the filter.
path_update() will now use the passed attribute so it can't be simply reused.
OK henning@

Revision 1.17 / (download) - annotate - [select for diffs], Mon Mar 1 17:04:07 2004 UTC (20 years, 3 months ago) by henning
Branch: MAIN
Changes since 1.16: +2 -2 lines
Diff to previous 1.16 (colored)

KNF

Revision 1.16 / (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.15: +4 -4 lines
Diff to previous 1.15 (colored)

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

Revision 1.15 / (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.14: +20 -10 lines
Diff to previous 1.14 (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.14 / (download) - annotate - [select for diffs], Tue Feb 24 15:44:33 2004 UTC (20 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.13: +2 -2 lines
Diff to previous 1.13 (colored)

spaces

Revision 1.13 / (download) - annotate - [select for diffs], Mon Feb 23 16:46:24 2004 UTC (20 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.12: +4 -2 lines
Diff to previous 1.12 (colored)

While searching a different bug found those two gems. The ntohs is obvious
the plen adjusting is needed to jump over the value that we ignore.
yaya henning@

Revision 1.12 / (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.11: +18 -3 lines
Diff to previous 1.11 (colored)

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

Revision 1.11 / (download) - annotate - [select for diffs], Thu Feb 19 13:54:58 2004 UTC (20 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.10: +4 -4 lines
Diff to previous 1.10 (colored)

Make the code more portable. Add some missing header files and make the use
of the queue(3) makros more portable. OK henning@ some time ago.

Revision 1.10 / (download) - annotate - [select for diffs], Thu Feb 19 10:55:41 2004 UTC (20 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.9: +1 -5 lines
Diff to previous 1.9 (colored)

Doh. Copy pasto. The if is always false and bogus.

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

Correctly handle parse errors in aspath and prefixes. Also do input aspath
loop detection. OK henning@

Revision 1.8 / (download) - annotate - [select for diffs], Wed Feb 18 16:36:09 2004 UTC (20 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.7: +68 -2 lines
Diff to previous 1.7 (colored)

Bring the path attribute parsing on big step closer to the RFC.
Check that evry attribut is only allowed once and ensure that the
mandatory attributes are present.
no objections henning@

Revision 1.7 / (download) - annotate - [select for diffs], Wed Feb 18 11:11:06 2004 UTC (20 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.6: +12 -5 lines
Diff to previous 1.6 (colored)

Check for optional path attributes error. This kills some XXX in the code.
OK henning@

Revision 1.6 / (download) - annotate - [select for diffs], Mon Feb 16 18:02:12 2004 UTC (20 years, 3 months ago) by henning
Branch: MAIN
Changes since 1.5: +2 -2 lines
Diff to previous 1.5 (colored)

KNF

Revision 1.5 / (download) - annotate - [select for diffs], Mon Feb 16 13:21:46 2004 UTC (20 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.4: +40 -1 lines
Diff to previous 1.4 (colored)

Basic aspath match function needed for filters and the "show rib" bgpctl
command. OK henning@

Revision 1.4 / (download) - annotate - [select for diffs], Mon Feb 16 12:58:45 2004 UTC (20 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.3: +102 -2 lines
Diff to previous 1.3 (colored)

Add basic functions to print aspath in human readable format. OK henning@

Revision 1.3 / (download) - annotate - [select for diffs], Mon Feb 16 12:53:15 2004 UTC (20 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.2: +240 -10 lines
Diff to previous 1.2 (colored)

Make the path attribute handling more RFC conformant. Also move the
parser to rde_attr.c where it belongs. Still missing: better aspath loop
detection (should be done afterwards) and some basic error checking for
optional attributes. OK henning@

Revision 1.2 / (download) - annotate - [select for diffs], Mon Feb 9 01:56:18 2004 UTC (20 years, 4 months ago) by henning
Branch: MAIN
Changes since 1.1: +3 -3 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:18:03 2004 UTC (20 years, 4 months ago) by claudio
Branch: MAIN

Move BGP path attribute handling functions in a own file. 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.