History log of /openbsd-current/usr.sbin/bgpd/Makefile
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.39 17-Apr-2023 claudio

Implement a basic API to work with flowspec NLRI.

Flowspec is excessivly flexible and large so there is no way to convert
the flowspec data into a struct bgpd_addr and it is better to keep it in
wireformat and add a few functions to validate and extract information
from the NLRI encoding.
OK tb@


Revision tags: OPENBSD_7_3_BASE
# 1.38 11-Jan-2023 claudio

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 tags: OPENBSD_6_9_BASE OPENBSD_7_0_BASE OPENBSD_7_1_BASE OPENBSD_7_2_BASE
# 1.37 16-Feb-2021 claudio

Add RTR support to OpenBGPD. Add basic support for the protocol.
The RTR client runs in a new process where the protocol handling is done
and when new data is available all sources are merged into one ROA set
which is then loaded into the RDE. The roa-set from the config is also
handled by the new RTR engine.
Tested by and ok job@


Revision tags: OPENBSD_6_7_BASE OPENBSD_6_8_BASE
# 1.36 01-Jan-2020 claudio

Instead of processing all imsg when reading them store peer specific
messages on a per peer queue. This queue is later processed one at a
time resulting in a fairer processing of work and avoiding big table
dumps to delay processing of other updates.
OK denis@ benno@


Revision tags: OPENBSD_6_6_BASE
# 1.35 17-Jun-2019 claudio

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 tags: OPENBSD_6_4_BASE OPENBSD_6_5_BASE
# 1.34 07-Sep-2018 claudio

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@


# 1.33 07-Sep-2018 claudio

Implement as-set a fast lookup table to be used instead of long list of
AS numbers in source-as, AS and transit-as filterstatements. These table
use bsearch to quickly verify if an AS is in the set or not.
The filter syntax is not fully set in stone yet.
OK denis@ benno@ and previously OK deraadt@


Revision tags: OPENBSD_6_2_BASE OPENBSD_6_3_BASE
# 1.32 21-Aug-2017 phessler

undo unintentional commits


# 1.31 21-Aug-2017 phessler

When 'enforce neighbor-as no' is set, don't do a config-time check for the neighbor-as, as it is dynamic.


Revision tags: OPENBSD_6_1_BASE
# 1.30 02-Sep-2016 benno

work on making log.c similar in all daemons:

move daemon-local functions into new logmsg.c, and reduce
the (mostly whitespace) differences so that log.c's can be diffed easily.

ok claudio@, feedback from henning@, deraadt@, reyk@


Revision tags: OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.29 26-May-2010 nicm

Move imsg into libutil and add a man page.

Minor bump for libutil.

Previous versions of this diff and man page looked at by various people.

"you should just commit" deraadt


Revision tags: OPENBSD_4_6_BASE OPENBSD_4_7_BASE
# 1.28 25-Jun-2009 deraadt

incorrect .PATH setting, discovered with nicm


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE
# 1.27 20-Dec-2007 henning

rework timers.
stop changing tienmr values directly, always use new
timer_(get/set/stop/running) functions. preparation for more to come :)
ok claudio


Revision tags: OPENBSD_4_1_BASE OPENBSD_4_2_BASE
# 1.26 08-Dec-2006 itojun

no need for KAME_SCOPEID; just check __KAME__.


Revision tags: OPENBSD_4_0_BASE
# 1.25 17-Jun-2006 henning

implement carp demotion control for bgpd.
sessions can be configured to modify the carp demotion counter for a
given interface group (usually, "carp", which has all carp interfaces)
when the session is not established. once the session is established for
60 seconds, the demotion is cleared.
this, used correctly, can prevent a bgpd-box which lost all sessions (and
thus has no routes) to be carp master, while the backup has sessions.
thought through and partially hacked on a drive from calgary to vancouver
with ryan, ok claudio


Revision tags: OPENBSD_3_9_BASE
# 1.24 03-Jan-2006 claudio

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


Revision tags: OPENBSD_3_8_BASE
# 1.23 13-Jun-2005 henning

route label support, kroute part and ID allocator as well as the internal
interface changes. support in the filter language and rde to come. claudio ok


# 1.22 28-Mar-2005 henning

ewps, this was not supposed to creep in


# 1.21 28-Mar-2005 henning

free rules_l if the initial config file parse fails


Revision tags: OPENBSD_3_7_BASE
# 1.20 11-Nov-2004 claudio

Unbreak peer_localaddr() because Link Local Addresses reported by
getifaddrs() have the scope id added to the address and so fuck up in the
compare later. This part has bin stolen from ifconfig/ifconfig.c and shows
the beauty of IPv6. Thank you KAME.
disgusting but OK henning@


Revision tags: OPENBSD_3_6_BASE
# 1.19 07-May-2004 djm

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 tags: OPENBSD_3_5_BASE
# 1.18 11-Mar-2004 claudio

Type in Makefile. CLFAGS != CFLAGS and we don't want -Wredundant-decls the
standard include files are full of redundant declarations. OK henning@


# 1.17 19-Feb-2004 claudio

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


# 1.16 08-Feb-2004 henning

factor out functions to print the configuration (rules only for now)
will become more and needed by bgpctl too


# 1.15 04-Feb-2004 claudio

Move BGP path attribute handling functions in a own file. henning@ conceptual ok


# 1.14 04-Feb-2004 claudio

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


# 1.13 26-Jan-2004 henning

first cut at tcpmd5 setup seupport from within bgpd. works so far.
with help from hshoexer@ and markus@
ok claudio@ hshoexer@ markus@


# 1.12 05-Jan-2004 espie

include path fixes for gcc3.
tests otto@, okay millert@


# 1.11 02-Jan-2004 deraadt

compile like it used to


# 1.10 01-Jan-2004 henning

add bgpdctl


# 1.9 01-Jan-2004 henning

prepare for bgpdctl


# 1.8 01-Jan-2004 henning

listen on a AF_LOCAL socket for imsgs too.
only implemented type yet is IMSG_CTL_SHOW_NEIGHBOR which sends back
the struct peer for all neighbors.
will be used by bgpdctl


# 1.7 23-Dec-2003 henning

bloody attempt at the other manpage.
this time with (non-bloody) help from jmc@


# 1.6 22-Dec-2003 henning

o add low-level functions for adding/chaining/removing kernel routes
o define new imsg types for this
o process these imsgs in the parent process

now "only" debugging and the rde sending these messages is missing.

ok claudio@


# 1.5 22-Dec-2003 henning

my bloody attempt at a manpage. to be fleshed out.


# 1.4 20-Dec-2003 henning

zap -Werror and -Wcast-align


# 1.3 20-Dec-2003 henning

better set of warning opts


# 1.2 17-Dec-2003 henning

oups, kill (then helpful) shit from the time when it live out of the tree...
noticed by Dries Schellekens <gwyllion@ace.ulyssis.org>


# 1.1 17-Dec-2003 henning

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

not connected to the builds yet.


# 1.38 11-Jan-2023 claudio

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 tags: OPENBSD_6_9_BASE OPENBSD_7_0_BASE OPENBSD_7_1_BASE OPENBSD_7_2_BASE
# 1.37 16-Feb-2021 claudio

Add RTR support to OpenBGPD. Add basic support for the protocol.
The RTR client runs in a new process where the protocol handling is done
and when new data is available all sources are merged into one ROA set
which is then loaded into the RDE. The roa-set from the config is also
handled by the new RTR engine.
Tested by and ok job@


Revision tags: OPENBSD_6_7_BASE OPENBSD_6_8_BASE
# 1.36 01-Jan-2020 claudio

Instead of processing all imsg when reading them store peer specific
messages on a per peer queue. This queue is later processed one at a
time resulting in a fairer processing of work and avoiding big table
dumps to delay processing of other updates.
OK denis@ benno@


Revision tags: OPENBSD_6_6_BASE
# 1.35 17-Jun-2019 claudio

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 tags: OPENBSD_6_4_BASE OPENBSD_6_5_BASE
# 1.34 07-Sep-2018 claudio

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@


# 1.33 07-Sep-2018 claudio

Implement as-set a fast lookup table to be used instead of long list of
AS numbers in source-as, AS and transit-as filterstatements. These table
use bsearch to quickly verify if an AS is in the set or not.
The filter syntax is not fully set in stone yet.
OK denis@ benno@ and previously OK deraadt@


Revision tags: OPENBSD_6_2_BASE OPENBSD_6_3_BASE
# 1.32 21-Aug-2017 phessler

undo unintentional commits


# 1.31 21-Aug-2017 phessler

When 'enforce neighbor-as no' is set, don't do a config-time check for the neighbor-as, as it is dynamic.


Revision tags: OPENBSD_6_1_BASE
# 1.30 02-Sep-2016 benno

work on making log.c similar in all daemons:

move daemon-local functions into new logmsg.c, and reduce
the (mostly whitespace) differences so that log.c's can be diffed easily.

ok claudio@, feedback from henning@, deraadt@, reyk@


Revision tags: OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.29 26-May-2010 nicm

Move imsg into libutil and add a man page.

Minor bump for libutil.

Previous versions of this diff and man page looked at by various people.

"you should just commit" deraadt


Revision tags: OPENBSD_4_6_BASE OPENBSD_4_7_BASE
# 1.28 25-Jun-2009 deraadt

incorrect .PATH setting, discovered with nicm


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE
# 1.27 20-Dec-2007 henning

rework timers.
stop changing tienmr values directly, always use new
timer_(get/set/stop/running) functions. preparation for more to come :)
ok claudio


Revision tags: OPENBSD_4_1_BASE OPENBSD_4_2_BASE
# 1.26 08-Dec-2006 itojun

no need for KAME_SCOPEID; just check __KAME__.


Revision tags: OPENBSD_4_0_BASE
# 1.25 17-Jun-2006 henning

implement carp demotion control for bgpd.
sessions can be configured to modify the carp demotion counter for a
given interface group (usually, "carp", which has all carp interfaces)
when the session is not established. once the session is established for
60 seconds, the demotion is cleared.
this, used correctly, can prevent a bgpd-box which lost all sessions (and
thus has no routes) to be carp master, while the backup has sessions.
thought through and partially hacked on a drive from calgary to vancouver
with ryan, ok claudio


Revision tags: OPENBSD_3_9_BASE
# 1.24 03-Jan-2006 claudio

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


Revision tags: OPENBSD_3_8_BASE
# 1.23 13-Jun-2005 henning

route label support, kroute part and ID allocator as well as the internal
interface changes. support in the filter language and rde to come. claudio ok


# 1.22 28-Mar-2005 henning

ewps, this was not supposed to creep in


# 1.21 28-Mar-2005 henning

free rules_l if the initial config file parse fails


Revision tags: OPENBSD_3_7_BASE
# 1.20 11-Nov-2004 claudio

Unbreak peer_localaddr() because Link Local Addresses reported by
getifaddrs() have the scope id added to the address and so fuck up in the
compare later. This part has bin stolen from ifconfig/ifconfig.c and shows
the beauty of IPv6. Thank you KAME.
disgusting but OK henning@


Revision tags: OPENBSD_3_6_BASE
# 1.19 07-May-2004 djm

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 tags: OPENBSD_3_5_BASE
# 1.18 11-Mar-2004 claudio

Type in Makefile. CLFAGS != CFLAGS and we don't want -Wredundant-decls the
standard include files are full of redundant declarations. OK henning@


# 1.17 19-Feb-2004 claudio

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


# 1.16 08-Feb-2004 henning

factor out functions to print the configuration (rules only for now)
will become more and needed by bgpctl too


# 1.15 04-Feb-2004 claudio

Move BGP path attribute handling functions in a own file. henning@ conceptual ok


# 1.14 04-Feb-2004 claudio

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


# 1.13 26-Jan-2004 henning

first cut at tcpmd5 setup seupport from within bgpd. works so far.
with help from hshoexer@ and markus@
ok claudio@ hshoexer@ markus@


# 1.12 05-Jan-2004 espie

include path fixes for gcc3.
tests otto@, okay millert@


# 1.11 02-Jan-2004 deraadt

compile like it used to


# 1.10 01-Jan-2004 henning

add bgpdctl


# 1.9 01-Jan-2004 henning

prepare for bgpdctl


# 1.8 01-Jan-2004 henning

listen on a AF_LOCAL socket for imsgs too.
only implemented type yet is IMSG_CTL_SHOW_NEIGHBOR which sends back
the struct peer for all neighbors.
will be used by bgpdctl


# 1.7 23-Dec-2003 henning

bloody attempt at the other manpage.
this time with (non-bloody) help from jmc@


# 1.6 22-Dec-2003 henning

o add low-level functions for adding/chaining/removing kernel routes
o define new imsg types for this
o process these imsgs in the parent process

now "only" debugging and the rde sending these messages is missing.

ok claudio@


# 1.5 22-Dec-2003 henning

my bloody attempt at a manpage. to be fleshed out.


# 1.4 20-Dec-2003 henning

zap -Werror and -Wcast-align


# 1.3 20-Dec-2003 henning

better set of warning opts


# 1.2 17-Dec-2003 henning

oups, kill (then helpful) shit from the time when it live out of the tree...
noticed by Dries Schellekens <gwyllion@ace.ulyssis.org>


# 1.1 17-Dec-2003 henning

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

not connected to the builds yet.


# 1.37 16-Feb-2021 claudio

Add RTR support to OpenBGPD. Add basic support for the protocol.
The RTR client runs in a new process where the protocol handling is done
and when new data is available all sources are merged into one ROA set
which is then loaded into the RDE. The roa-set from the config is also
handled by the new RTR engine.
Tested by and ok job@


Revision tags: OPENBSD_6_7_BASE OPENBSD_6_8_BASE
# 1.36 01-Jan-2020 claudio

Instead of processing all imsg when reading them store peer specific
messages on a per peer queue. This queue is later processed one at a
time resulting in a fairer processing of work and avoiding big table
dumps to delay processing of other updates.
OK denis@ benno@


Revision tags: OPENBSD_6_6_BASE
# 1.35 17-Jun-2019 claudio

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 tags: OPENBSD_6_4_BASE OPENBSD_6_5_BASE
# 1.34 07-Sep-2018 claudio

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@


# 1.33 07-Sep-2018 claudio

Implement as-set a fast lookup table to be used instead of long list of
AS numbers in source-as, AS and transit-as filterstatements. These table
use bsearch to quickly verify if an AS is in the set or not.
The filter syntax is not fully set in stone yet.
OK denis@ benno@ and previously OK deraadt@


Revision tags: OPENBSD_6_2_BASE OPENBSD_6_3_BASE
# 1.32 21-Aug-2017 phessler

undo unintentional commits


# 1.31 21-Aug-2017 phessler

When 'enforce neighbor-as no' is set, don't do a config-time check for the neighbor-as, as it is dynamic.


Revision tags: OPENBSD_6_1_BASE
# 1.30 02-Sep-2016 benno

work on making log.c similar in all daemons:

move daemon-local functions into new logmsg.c, and reduce
the (mostly whitespace) differences so that log.c's can be diffed easily.

ok claudio@, feedback from henning@, deraadt@, reyk@


Revision tags: OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.29 26-May-2010 nicm

Move imsg into libutil and add a man page.

Minor bump for libutil.

Previous versions of this diff and man page looked at by various people.

"you should just commit" deraadt


Revision tags: OPENBSD_4_6_BASE OPENBSD_4_7_BASE
# 1.28 25-Jun-2009 deraadt

incorrect .PATH setting, discovered with nicm


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE
# 1.27 20-Dec-2007 henning

rework timers.
stop changing tienmr values directly, always use new
timer_(get/set/stop/running) functions. preparation for more to come :)
ok claudio


Revision tags: OPENBSD_4_1_BASE OPENBSD_4_2_BASE
# 1.26 08-Dec-2006 itojun

no need for KAME_SCOPEID; just check __KAME__.


Revision tags: OPENBSD_4_0_BASE
# 1.25 17-Jun-2006 henning

implement carp demotion control for bgpd.
sessions can be configured to modify the carp demotion counter for a
given interface group (usually, "carp", which has all carp interfaces)
when the session is not established. once the session is established for
60 seconds, the demotion is cleared.
this, used correctly, can prevent a bgpd-box which lost all sessions (and
thus has no routes) to be carp master, while the backup has sessions.
thought through and partially hacked on a drive from calgary to vancouver
with ryan, ok claudio


Revision tags: OPENBSD_3_9_BASE
# 1.24 03-Jan-2006 claudio

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


Revision tags: OPENBSD_3_8_BASE
# 1.23 13-Jun-2005 henning

route label support, kroute part and ID allocator as well as the internal
interface changes. support in the filter language and rde to come. claudio ok


# 1.22 28-Mar-2005 henning

ewps, this was not supposed to creep in


# 1.21 28-Mar-2005 henning

free rules_l if the initial config file parse fails


Revision tags: OPENBSD_3_7_BASE
# 1.20 11-Nov-2004 claudio

Unbreak peer_localaddr() because Link Local Addresses reported by
getifaddrs() have the scope id added to the address and so fuck up in the
compare later. This part has bin stolen from ifconfig/ifconfig.c and shows
the beauty of IPv6. Thank you KAME.
disgusting but OK henning@


Revision tags: OPENBSD_3_6_BASE
# 1.19 07-May-2004 djm

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 tags: OPENBSD_3_5_BASE
# 1.18 11-Mar-2004 claudio

Type in Makefile. CLFAGS != CFLAGS and we don't want -Wredundant-decls the
standard include files are full of redundant declarations. OK henning@


# 1.17 19-Feb-2004 claudio

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


# 1.16 08-Feb-2004 henning

factor out functions to print the configuration (rules only for now)
will become more and needed by bgpctl too


# 1.15 04-Feb-2004 claudio

Move BGP path attribute handling functions in a own file. henning@ conceptual ok


# 1.14 04-Feb-2004 claudio

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


# 1.13 26-Jan-2004 henning

first cut at tcpmd5 setup seupport from within bgpd. works so far.
with help from hshoexer@ and markus@
ok claudio@ hshoexer@ markus@


# 1.12 05-Jan-2004 espie

include path fixes for gcc3.
tests otto@, okay millert@


# 1.11 02-Jan-2004 deraadt

compile like it used to


# 1.10 01-Jan-2004 henning

add bgpdctl


# 1.9 01-Jan-2004 henning

prepare for bgpdctl


# 1.8 01-Jan-2004 henning

listen on a AF_LOCAL socket for imsgs too.
only implemented type yet is IMSG_CTL_SHOW_NEIGHBOR which sends back
the struct peer for all neighbors.
will be used by bgpdctl


# 1.7 23-Dec-2003 henning

bloody attempt at the other manpage.
this time with (non-bloody) help from jmc@


# 1.6 22-Dec-2003 henning

o add low-level functions for adding/chaining/removing kernel routes
o define new imsg types for this
o process these imsgs in the parent process

now "only" debugging and the rde sending these messages is missing.

ok claudio@


# 1.5 22-Dec-2003 henning

my bloody attempt at a manpage. to be fleshed out.


# 1.4 20-Dec-2003 henning

zap -Werror and -Wcast-align


# 1.3 20-Dec-2003 henning

better set of warning opts


# 1.2 17-Dec-2003 henning

oups, kill (then helpful) shit from the time when it live out of the tree...
noticed by Dries Schellekens <gwyllion@ace.ulyssis.org>


# 1.1 17-Dec-2003 henning

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

not connected to the builds yet.


# 1.36 01-Jan-2020 claudio

Instead of processing all imsg when reading them store peer specific
messages on a per peer queue. This queue is later processed one at a
time resulting in a fairer processing of work and avoiding big table
dumps to delay processing of other updates.
OK denis@ benno@


Revision tags: OPENBSD_6_6_BASE
# 1.35 17-Jun-2019 claudio

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 tags: OPENBSD_6_4_BASE OPENBSD_6_5_BASE
# 1.34 07-Sep-2018 claudio

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@


# 1.33 07-Sep-2018 claudio

Implement as-set a fast lookup table to be used instead of long list of
AS numbers in source-as, AS and transit-as filterstatements. These table
use bsearch to quickly verify if an AS is in the set or not.
The filter syntax is not fully set in stone yet.
OK denis@ benno@ and previously OK deraadt@


Revision tags: OPENBSD_6_2_BASE OPENBSD_6_3_BASE
# 1.32 21-Aug-2017 phessler

undo unintentional commits


# 1.31 21-Aug-2017 phessler

When 'enforce neighbor-as no' is set, don't do a config-time check for the neighbor-as, as it is dynamic.


Revision tags: OPENBSD_6_1_BASE
# 1.30 02-Sep-2016 benno

work on making log.c similar in all daemons:

move daemon-local functions into new logmsg.c, and reduce
the (mostly whitespace) differences so that log.c's can be diffed easily.

ok claudio@, feedback from henning@, deraadt@, reyk@


Revision tags: OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.29 26-May-2010 nicm

Move imsg into libutil and add a man page.

Minor bump for libutil.

Previous versions of this diff and man page looked at by various people.

"you should just commit" deraadt


Revision tags: OPENBSD_4_6_BASE OPENBSD_4_7_BASE
# 1.28 25-Jun-2009 deraadt

incorrect .PATH setting, discovered with nicm


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE
# 1.27 20-Dec-2007 henning

rework timers.
stop changing tienmr values directly, always use new
timer_(get/set/stop/running) functions. preparation for more to come :)
ok claudio


Revision tags: OPENBSD_4_1_BASE OPENBSD_4_2_BASE
# 1.26 08-Dec-2006 itojun

no need for KAME_SCOPEID; just check __KAME__.


Revision tags: OPENBSD_4_0_BASE
# 1.25 17-Jun-2006 henning

implement carp demotion control for bgpd.
sessions can be configured to modify the carp demotion counter for a
given interface group (usually, "carp", which has all carp interfaces)
when the session is not established. once the session is established for
60 seconds, the demotion is cleared.
this, used correctly, can prevent a bgpd-box which lost all sessions (and
thus has no routes) to be carp master, while the backup has sessions.
thought through and partially hacked on a drive from calgary to vancouver
with ryan, ok claudio


Revision tags: OPENBSD_3_9_BASE
# 1.24 03-Jan-2006 claudio

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


Revision tags: OPENBSD_3_8_BASE
# 1.23 13-Jun-2005 henning

route label support, kroute part and ID allocator as well as the internal
interface changes. support in the filter language and rde to come. claudio ok


# 1.22 28-Mar-2005 henning

ewps, this was not supposed to creep in


# 1.21 28-Mar-2005 henning

free rules_l if the initial config file parse fails


Revision tags: OPENBSD_3_7_BASE
# 1.20 11-Nov-2004 claudio

Unbreak peer_localaddr() because Link Local Addresses reported by
getifaddrs() have the scope id added to the address and so fuck up in the
compare later. This part has bin stolen from ifconfig/ifconfig.c and shows
the beauty of IPv6. Thank you KAME.
disgusting but OK henning@


Revision tags: OPENBSD_3_6_BASE
# 1.19 07-May-2004 djm

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 tags: OPENBSD_3_5_BASE
# 1.18 11-Mar-2004 claudio

Type in Makefile. CLFAGS != CFLAGS and we don't want -Wredundant-decls the
standard include files are full of redundant declarations. OK henning@


# 1.17 19-Feb-2004 claudio

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


# 1.16 08-Feb-2004 henning

factor out functions to print the configuration (rules only for now)
will become more and needed by bgpctl too


# 1.15 04-Feb-2004 claudio

Move BGP path attribute handling functions in a own file. henning@ conceptual ok


# 1.14 04-Feb-2004 claudio

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


# 1.13 26-Jan-2004 henning

first cut at tcpmd5 setup seupport from within bgpd. works so far.
with help from hshoexer@ and markus@
ok claudio@ hshoexer@ markus@


# 1.12 05-Jan-2004 espie

include path fixes for gcc3.
tests otto@, okay millert@


# 1.11 02-Jan-2004 deraadt

compile like it used to


# 1.10 01-Jan-2004 henning

add bgpdctl


# 1.9 01-Jan-2004 henning

prepare for bgpdctl


# 1.8 01-Jan-2004 henning

listen on a AF_LOCAL socket for imsgs too.
only implemented type yet is IMSG_CTL_SHOW_NEIGHBOR which sends back
the struct peer for all neighbors.
will be used by bgpdctl


# 1.7 23-Dec-2003 henning

bloody attempt at the other manpage.
this time with (non-bloody) help from jmc@


# 1.6 22-Dec-2003 henning

o add low-level functions for adding/chaining/removing kernel routes
o define new imsg types for this
o process these imsgs in the parent process

now "only" debugging and the rde sending these messages is missing.

ok claudio@


# 1.5 22-Dec-2003 henning

my bloody attempt at a manpage. to be fleshed out.


# 1.4 20-Dec-2003 henning

zap -Werror and -Wcast-align


# 1.3 20-Dec-2003 henning

better set of warning opts


# 1.2 17-Dec-2003 henning

oups, kill (then helpful) shit from the time when it live out of the tree...
noticed by Dries Schellekens <gwyllion@ace.ulyssis.org>


# 1.1 17-Dec-2003 henning

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

not connected to the builds yet.


# 1.35 17-Jun-2019 claudio

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 tags: OPENBSD_6_4_BASE OPENBSD_6_5_BASE
# 1.34 07-Sep-2018 claudio

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@


# 1.33 07-Sep-2018 claudio

Implement as-set a fast lookup table to be used instead of long list of
AS numbers in source-as, AS and transit-as filterstatements. These table
use bsearch to quickly verify if an AS is in the set or not.
The filter syntax is not fully set in stone yet.
OK denis@ benno@ and previously OK deraadt@


Revision tags: OPENBSD_6_2_BASE OPENBSD_6_3_BASE
# 1.32 21-Aug-2017 phessler

undo unintentional commits


# 1.31 21-Aug-2017 phessler

When 'enforce neighbor-as no' is set, don't do a config-time check for the neighbor-as, as it is dynamic.


Revision tags: OPENBSD_6_1_BASE
# 1.30 02-Sep-2016 benno

work on making log.c similar in all daemons:

move daemon-local functions into new logmsg.c, and reduce
the (mostly whitespace) differences so that log.c's can be diffed easily.

ok claudio@, feedback from henning@, deraadt@, reyk@


Revision tags: OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.29 26-May-2010 nicm

Move imsg into libutil and add a man page.

Minor bump for libutil.

Previous versions of this diff and man page looked at by various people.

"you should just commit" deraadt


Revision tags: OPENBSD_4_6_BASE OPENBSD_4_7_BASE
# 1.28 25-Jun-2009 deraadt

incorrect .PATH setting, discovered with nicm


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE
# 1.27 20-Dec-2007 henning

rework timers.
stop changing tienmr values directly, always use new
timer_(get/set/stop/running) functions. preparation for more to come :)
ok claudio


Revision tags: OPENBSD_4_1_BASE OPENBSD_4_2_BASE
# 1.26 08-Dec-2006 itojun

no need for KAME_SCOPEID; just check __KAME__.


Revision tags: OPENBSD_4_0_BASE
# 1.25 17-Jun-2006 henning

implement carp demotion control for bgpd.
sessions can be configured to modify the carp demotion counter for a
given interface group (usually, "carp", which has all carp interfaces)
when the session is not established. once the session is established for
60 seconds, the demotion is cleared.
this, used correctly, can prevent a bgpd-box which lost all sessions (and
thus has no routes) to be carp master, while the backup has sessions.
thought through and partially hacked on a drive from calgary to vancouver
with ryan, ok claudio


Revision tags: OPENBSD_3_9_BASE
# 1.24 03-Jan-2006 claudio

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


Revision tags: OPENBSD_3_8_BASE
# 1.23 13-Jun-2005 henning

route label support, kroute part and ID allocator as well as the internal
interface changes. support in the filter language and rde to come. claudio ok


# 1.22 28-Mar-2005 henning

ewps, this was not supposed to creep in


# 1.21 28-Mar-2005 henning

free rules_l if the initial config file parse fails


Revision tags: OPENBSD_3_7_BASE
# 1.20 11-Nov-2004 claudio

Unbreak peer_localaddr() because Link Local Addresses reported by
getifaddrs() have the scope id added to the address and so fuck up in the
compare later. This part has bin stolen from ifconfig/ifconfig.c and shows
the beauty of IPv6. Thank you KAME.
disgusting but OK henning@


Revision tags: OPENBSD_3_6_BASE
# 1.19 07-May-2004 djm

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 tags: OPENBSD_3_5_BASE
# 1.18 11-Mar-2004 claudio

Type in Makefile. CLFAGS != CFLAGS and we don't want -Wredundant-decls the
standard include files are full of redundant declarations. OK henning@


# 1.17 19-Feb-2004 claudio

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


# 1.16 08-Feb-2004 henning

factor out functions to print the configuration (rules only for now)
will become more and needed by bgpctl too


# 1.15 04-Feb-2004 claudio

Move BGP path attribute handling functions in a own file. henning@ conceptual ok


# 1.14 04-Feb-2004 claudio

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


# 1.13 26-Jan-2004 henning

first cut at tcpmd5 setup seupport from within bgpd. works so far.
with help from hshoexer@ and markus@
ok claudio@ hshoexer@ markus@


# 1.12 05-Jan-2004 espie

include path fixes for gcc3.
tests otto@, okay millert@


# 1.11 02-Jan-2004 deraadt

compile like it used to


# 1.10 01-Jan-2004 henning

add bgpdctl


# 1.9 01-Jan-2004 henning

prepare for bgpdctl


# 1.8 01-Jan-2004 henning

listen on a AF_LOCAL socket for imsgs too.
only implemented type yet is IMSG_CTL_SHOW_NEIGHBOR which sends back
the struct peer for all neighbors.
will be used by bgpdctl


# 1.7 23-Dec-2003 henning

bloody attempt at the other manpage.
this time with (non-bloody) help from jmc@


# 1.6 22-Dec-2003 henning

o add low-level functions for adding/chaining/removing kernel routes
o define new imsg types for this
o process these imsgs in the parent process

now "only" debugging and the rde sending these messages is missing.

ok claudio@


# 1.5 22-Dec-2003 henning

my bloody attempt at a manpage. to be fleshed out.


# 1.4 20-Dec-2003 henning

zap -Werror and -Wcast-align


# 1.3 20-Dec-2003 henning

better set of warning opts


# 1.2 17-Dec-2003 henning

oups, kill (then helpful) shit from the time when it live out of the tree...
noticed by Dries Schellekens <gwyllion@ace.ulyssis.org>


# 1.1 17-Dec-2003 henning

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

not connected to the builds yet.


# 1.34 07-Sep-2018 claudio

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@


# 1.33 07-Sep-2018 claudio

Implement as-set a fast lookup table to be used instead of long list of
AS numbers in source-as, AS and transit-as filterstatements. These table
use bsearch to quickly verify if an AS is in the set or not.
The filter syntax is not fully set in stone yet.
OK denis@ benno@ and previously OK deraadt@


Revision tags: OPENBSD_6_2_BASE OPENBSD_6_3_BASE
# 1.32 21-Aug-2017 phessler

undo unintentional commits


# 1.31 21-Aug-2017 phessler

When 'enforce neighbor-as no' is set, don't do a config-time check for the neighbor-as, as it is dynamic.


Revision tags: OPENBSD_6_1_BASE
# 1.30 02-Sep-2016 benno

work on making log.c similar in all daemons:

move daemon-local functions into new logmsg.c, and reduce
the (mostly whitespace) differences so that log.c's can be diffed easily.

ok claudio@, feedback from henning@, deraadt@, reyk@


Revision tags: OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.29 26-May-2010 nicm

Move imsg into libutil and add a man page.

Minor bump for libutil.

Previous versions of this diff and man page looked at by various people.

"you should just commit" deraadt


Revision tags: OPENBSD_4_6_BASE OPENBSD_4_7_BASE
# 1.28 25-Jun-2009 deraadt

incorrect .PATH setting, discovered with nicm


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE
# 1.27 20-Dec-2007 henning

rework timers.
stop changing tienmr values directly, always use new
timer_(get/set/stop/running) functions. preparation for more to come :)
ok claudio


Revision tags: OPENBSD_4_1_BASE OPENBSD_4_2_BASE
# 1.26 08-Dec-2006 itojun

no need for KAME_SCOPEID; just check __KAME__.


Revision tags: OPENBSD_4_0_BASE
# 1.25 17-Jun-2006 henning

implement carp demotion control for bgpd.
sessions can be configured to modify the carp demotion counter for a
given interface group (usually, "carp", which has all carp interfaces)
when the session is not established. once the session is established for
60 seconds, the demotion is cleared.
this, used correctly, can prevent a bgpd-box which lost all sessions (and
thus has no routes) to be carp master, while the backup has sessions.
thought through and partially hacked on a drive from calgary to vancouver
with ryan, ok claudio


Revision tags: OPENBSD_3_9_BASE
# 1.24 03-Jan-2006 claudio

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


Revision tags: OPENBSD_3_8_BASE
# 1.23 13-Jun-2005 henning

route label support, kroute part and ID allocator as well as the internal
interface changes. support in the filter language and rde to come. claudio ok


# 1.22 28-Mar-2005 henning

ewps, this was not supposed to creep in


# 1.21 28-Mar-2005 henning

free rules_l if the initial config file parse fails


Revision tags: OPENBSD_3_7_BASE
# 1.20 11-Nov-2004 claudio

Unbreak peer_localaddr() because Link Local Addresses reported by
getifaddrs() have the scope id added to the address and so fuck up in the
compare later. This part has bin stolen from ifconfig/ifconfig.c and shows
the beauty of IPv6. Thank you KAME.
disgusting but OK henning@


Revision tags: OPENBSD_3_6_BASE
# 1.19 07-May-2004 djm

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 tags: OPENBSD_3_5_BASE
# 1.18 11-Mar-2004 claudio

Type in Makefile. CLFAGS != CFLAGS and we don't want -Wredundant-decls the
standard include files are full of redundant declarations. OK henning@


# 1.17 19-Feb-2004 claudio

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


# 1.16 08-Feb-2004 henning

factor out functions to print the configuration (rules only for now)
will become more and needed by bgpctl too


# 1.15 04-Feb-2004 claudio

Move BGP path attribute handling functions in a own file. henning@ conceptual ok


# 1.14 04-Feb-2004 claudio

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


# 1.13 26-Jan-2004 henning

first cut at tcpmd5 setup seupport from within bgpd. works so far.
with help from hshoexer@ and markus@
ok claudio@ hshoexer@ markus@


# 1.12 05-Jan-2004 espie

include path fixes for gcc3.
tests otto@, okay millert@


# 1.11 02-Jan-2004 deraadt

compile like it used to


# 1.10 01-Jan-2004 henning

add bgpdctl


# 1.9 01-Jan-2004 henning

prepare for bgpdctl


# 1.8 01-Jan-2004 henning

listen on a AF_LOCAL socket for imsgs too.
only implemented type yet is IMSG_CTL_SHOW_NEIGHBOR which sends back
the struct peer for all neighbors.
will be used by bgpdctl


# 1.7 23-Dec-2003 henning

bloody attempt at the other manpage.
this time with (non-bloody) help from jmc@


# 1.6 22-Dec-2003 henning

o add low-level functions for adding/chaining/removing kernel routes
o define new imsg types for this
o process these imsgs in the parent process

now "only" debugging and the rde sending these messages is missing.

ok claudio@


# 1.5 22-Dec-2003 henning

my bloody attempt at a manpage. to be fleshed out.


# 1.4 20-Dec-2003 henning

zap -Werror and -Wcast-align


# 1.3 20-Dec-2003 henning

better set of warning opts


# 1.2 17-Dec-2003 henning

oups, kill (then helpful) shit from the time when it live out of the tree...
noticed by Dries Schellekens <gwyllion@ace.ulyssis.org>


# 1.1 17-Dec-2003 henning

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

not connected to the builds yet.


Revision tags: OPENBSD_6_2_BASE
# 1.32 21-Aug-2017 phessler

undo unintentional commits


# 1.31 21-Aug-2017 phessler

When 'enforce neighbor-as no' is set, don't do a config-time check for the neighbor-as, as it is dynamic.


Revision tags: OPENBSD_6_1_BASE
# 1.30 02-Sep-2016 benno

work on making log.c similar in all daemons:

move daemon-local functions into new logmsg.c, and reduce
the (mostly whitespace) differences so that log.c's can be diffed easily.

ok claudio@, feedback from henning@, deraadt@, reyk@


Revision tags: OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.29 26-May-2010 nicm

Move imsg into libutil and add a man page.

Minor bump for libutil.

Previous versions of this diff and man page looked at by various people.

"you should just commit" deraadt


Revision tags: OPENBSD_4_6_BASE OPENBSD_4_7_BASE
# 1.28 25-Jun-2009 deraadt

incorrect .PATH setting, discovered with nicm


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE
# 1.27 20-Dec-2007 henning

rework timers.
stop changing tienmr values directly, always use new
timer_(get/set/stop/running) functions. preparation for more to come :)
ok claudio


Revision tags: OPENBSD_4_1_BASE OPENBSD_4_2_BASE
# 1.26 08-Dec-2006 itojun

no need for KAME_SCOPEID; just check __KAME__.


Revision tags: OPENBSD_4_0_BASE
# 1.25 17-Jun-2006 henning

implement carp demotion control for bgpd.
sessions can be configured to modify the carp demotion counter for a
given interface group (usually, "carp", which has all carp interfaces)
when the session is not established. once the session is established for
60 seconds, the demotion is cleared.
this, used correctly, can prevent a bgpd-box which lost all sessions (and
thus has no routes) to be carp master, while the backup has sessions.
thought through and partially hacked on a drive from calgary to vancouver
with ryan, ok claudio


Revision tags: OPENBSD_3_9_BASE
# 1.24 03-Jan-2006 claudio

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


Revision tags: OPENBSD_3_8_BASE
# 1.23 13-Jun-2005 henning

route label support, kroute part and ID allocator as well as the internal
interface changes. support in the filter language and rde to come. claudio ok


# 1.22 28-Mar-2005 henning

ewps, this was not supposed to creep in


# 1.21 28-Mar-2005 henning

free rules_l if the initial config file parse fails


Revision tags: OPENBSD_3_7_BASE
# 1.20 11-Nov-2004 claudio

Unbreak peer_localaddr() because Link Local Addresses reported by
getifaddrs() have the scope id added to the address and so fuck up in the
compare later. This part has bin stolen from ifconfig/ifconfig.c and shows
the beauty of IPv6. Thank you KAME.
disgusting but OK henning@


Revision tags: OPENBSD_3_6_BASE
# 1.19 07-May-2004 djm

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 tags: OPENBSD_3_5_BASE
# 1.18 11-Mar-2004 claudio

Type in Makefile. CLFAGS != CFLAGS and we don't want -Wredundant-decls the
standard include files are full of redundant declarations. OK henning@


# 1.17 19-Feb-2004 claudio

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


# 1.16 08-Feb-2004 henning

factor out functions to print the configuration (rules only for now)
will become more and needed by bgpctl too


# 1.15 04-Feb-2004 claudio

Move BGP path attribute handling functions in a own file. henning@ conceptual ok


# 1.14 04-Feb-2004 claudio

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


# 1.13 26-Jan-2004 henning

first cut at tcpmd5 setup seupport from within bgpd. works so far.
with help from hshoexer@ and markus@
ok claudio@ hshoexer@ markus@


# 1.12 05-Jan-2004 espie

include path fixes for gcc3.
tests otto@, okay millert@


# 1.11 02-Jan-2004 deraadt

compile like it used to


# 1.10 01-Jan-2004 henning

add bgpdctl


# 1.9 01-Jan-2004 henning

prepare for bgpdctl


# 1.8 01-Jan-2004 henning

listen on a AF_LOCAL socket for imsgs too.
only implemented type yet is IMSG_CTL_SHOW_NEIGHBOR which sends back
the struct peer for all neighbors.
will be used by bgpdctl


# 1.7 23-Dec-2003 henning

bloody attempt at the other manpage.
this time with (non-bloody) help from jmc@


# 1.6 22-Dec-2003 henning

o add low-level functions for adding/chaining/removing kernel routes
o define new imsg types for this
o process these imsgs in the parent process

now "only" debugging and the rde sending these messages is missing.

ok claudio@


# 1.5 22-Dec-2003 henning

my bloody attempt at a manpage. to be fleshed out.


# 1.4 20-Dec-2003 henning

zap -Werror and -Wcast-align


# 1.3 20-Dec-2003 henning

better set of warning opts


# 1.2 17-Dec-2003 henning

oups, kill (then helpful) shit from the time when it live out of the tree...
noticed by Dries Schellekens <gwyllion@ace.ulyssis.org>


# 1.1 17-Dec-2003 henning

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

not connected to the builds yet.