OpenBSD CVS

CVS log for src/usr.sbin/bgpd/session.h


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.170 / (download) - annotate - [select for diffs], Sat May 18 11:17:30 2024 UTC (3 weeks ago) by jsg
Branch: MAIN
CVS Tags: HEAD
Changes since 1.169: +1 -2 lines
Diff to previous 1.169 (colored)

remove prototypes with no matching function; ok claudio@

Revision 1.169 / (download) - annotate - [select for diffs], Mon Apr 22 09:36:04 2024 UTC (6 weeks, 5 days ago) by claudio
Branch: MAIN
Changes since 1.168: +2 -2 lines
Diff to previous 1.168 (colored)

Move setting of the shutdown reason to session_stop()

Also make sure that something is logged when a session is stopped.
Part of a bigger diff which was OK tb@

Revision 1.168 / (download) - annotate - [select for diffs], Fri Mar 22 07:19:28 2024 UTC (2 months, 2 weeks ago) by claudio
Branch: MAIN
Changes since 1.167: +2 -13 lines
Diff to previous 1.167 (colored)

Rework parse_notification() to use the ibuf API for everything.

While there fix the RFC5492 handling of ERR_OPEN_CAPA (the current code
has the logic inversed). ERR_OPEN_CAPA is there to signal that a needed
capability is missing in our OPEN message. Just add the handling of
ERR_OPEN_CAPA to log_notification().

Also rework the handling of the shutdown reason and move the printing
into log_notification().

OK tb@

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

Switch session_notification() over to use a struct ibuf to carry the
extra data. With this IMSG_UPDATE_ERR can use the new imsg API.

Introduce session_notification_data() for the few cases where there
is no ibuf readily available.

OK tb@

Revision 1.166 / (download) - annotate - [select for diffs], Thu Jan 11 15:46:25 2024 UTC (4 months, 3 weeks ago) by claudio
Branch: MAIN
Changes since 1.165: +2 -2 lines
Diff to previous 1.165 (colored)

rename field ibuf to imsgbuf in struct ctl_conn
OK tb@

Revision 1.165 / (download) - annotate - [select for diffs], Wed Jan 10 11:08:04 2024 UTC (4 months, 4 weeks ago) by claudio
Branch: MAIN
Changes since 1.164: +4 -3 lines
Diff to previous 1.164 (colored)

Update the control.c code to use the new imsg API.

OK tb@

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

Convert the session engine to use the new ibuf API.
OK tb@

Revision 1.163 / (download) - annotate - [select for diffs], Mon Oct 16 10:25:46 2023 UTC (7 months, 3 weeks ago) by claudio
Branch: MAIN
Changes since 1.162: +2 -1 lines
Diff to previous 1.162 (colored)

Improve IPv6 link-local address handling

When a session is established determine the possible interface scope of that
session. The scope is only set when the remote address is directly connected.
This interface scope is passed to the RDE that uses this information when
link-local nexthops are received. Again checking that a link-local nexthop
is actually acceptable.

OK tb@

Revision 1.162 / (download) - annotate - [select for diffs], Tue Mar 28 12:15:23 2023 UTC (14 months, 1 week ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_4_BASE, OPENBSD_7_4
Changes since 1.161: +4 -1 lines
Diff to previous 1.161 (colored)

Introduce a semaphore to protect intermediate state from different RTR
sessions to leak into the RDE via rtr_recalc. Only run rtr_recalc when
the last or only RTR session is done with the update. Run a new timer
along to ensure that the semaphore is not hold forever. The timeout
is currently a very generous 60sec, no RTR cache should be that slow.
OK tb@

Revision 1.161 / (download) - annotate - [select for diffs], Thu Mar 9 17:21:21 2023 UTC (15 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_3_BASE, OPENBSD_7_3
Changes since 1.160: +4 -2 lines
Diff to previous 1.160 (colored)

Implement ASPA support in RTR by following draft-ietf-sidrops-8210bis-10.

In rtr.c renamed rtr_aspa_merge_set() to rtr_aspa_insert() and move it
close to rtr_roa_insert().
In rtr_proto.c most complexity comes from the version negotiation. The
ASPA parser is reasonably streight forward. The version negotiation is
fragile but that is mostly because of the protocol specification and the
fact that RTR cache daemons sometimes fail to send errors.
OK tb@

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

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

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

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

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

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

Revision 1.158 / (download) - annotate - [select for diffs], Mon Aug 29 14:57:27 2022 UTC (21 months, 1 week ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2
Changes since 1.157: +3 -1 lines
Diff to previous 1.157 (colored)

Export pending update and withdraw as part of struct peer_stats.
OK tb@

Revision 1.157 / (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.156: +3 -3 lines
Diff to previous 1.156 (colored)

whitespace found during a read-thru; ok claudio

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

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

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

Revision 1.155 / (download) - annotate - [select for diffs], Wed Jun 15 14:09:30 2022 UTC (23 months, 3 weeks ago) by claudio
Branch: MAIN
Changes since 1.154: +2 -1 lines
Diff to previous 1.154 (colored)

Do not use defines from pfkeyv2.h in portable code.

Instead define our own algorithm enums for the IPsec code.
OK tb@ sthen@

Revision 1.154 / (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.153: +47 -47 lines
Diff to previous 1.153 (colored)

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

Revision 1.153 / (download) - annotate - [select for diffs], Fri Sep 3 07:48:24 2021 UTC (2 years, 9 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0
Changes since 1.152: +2 -2 lines
Diff to previous 1.152 (colored)

Add add-path support in MRT dumps (RFC8050).

This works for table-v2 formats and also for the all and update dumps.
For the latter the code needs to inspect the UPDATE message to guess if
add-path is used in that message or not.  Add-path can be enabled per
AFI and alters the NLRI encoding without any way to detect.
For table dumps we decided to dump RIB_GENERIC entires the same way as
gobgp and not use the encoding from the RFC. The RFC specifies that
RIB_GENERIC (non-IPv4/v6) entries in a way that is not only different
but also against the normal codeflow. Only gobgp seems to implement
RIB_GENERIC encoding (neither bird nor frr/quagga do) and so it makes
sense to follow their way.

OK benno@

Revision 1.152 / (download) - annotate - [select for diffs], Tue Jul 27 07:14:31 2021 UTC (2 years, 10 months ago) by claudio
Branch: MAIN
Changes since 1.151: +3 -2 lines
Diff to previous 1.151 (colored)

Implement RFC9072: Extended Optional Parameters Length for BGP OPEN Message

This allows to send more then 255 bytes of optional parameters. With this
it is possible to send more capabilities. bgpd will switch automatically
to the new extended lenght format if needed but by default the old 1 byte
param length encoding is used to keep compatible with old systems.

OK benno@

Revision 1.151 / (download) - annotate - [select for diffs], Thu May 27 08:27:48 2021 UTC (3 years ago) by claudio
Branch: MAIN
Changes since 1.150: +15 -6 lines
Diff to previous 1.150 (colored)

bgpd(8) will soon support ADD-PATH (RFC7911) and enhanced route refresh
(RFC7313). This is the frist step toward this.

It adds the capability parsers for the two no capabilities, extends the
capability struct and adds the capability negotiation bits.
The route refresh message parser and generator are extended to support
the BoRR and EoRR message. Also add the new NOTIFICATION type and subtype
for the route refresh message.

Revision 1.150 / (download) - annotate - [select for diffs], Tue Feb 16 08:29:16 2021 UTC (3 years, 3 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE, OPENBSD_6_9
Changes since 1.149: +28 -5 lines
Diff to previous 1.149 (colored)

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 1.149 / (download) - annotate - [select for diffs], Wed Dec 23 13:20:48 2020 UTC (3 years, 5 months ago) by claudio
Branch: MAIN
Changes since 1.148: +3 -1 lines
Diff to previous 1.148 (colored)

BGP uses KEEPALIVE packets and the HOLD timer to detect stalled sessions.
The problem is that this timer only looks at the receive side of the TCP
session. If for some reason the send side stalls the system fully depends
on the remote BGP peer to reset the session. As seen in an ever growing
OutQ and as a result important changes can get stalled and cause routing
troubles.

This change introduces a SEND HOLD timer. The timer is reset whenever the
session engine was able to write data to the TCP socket. If the send hold
timer expires bgpd was not able to send any data to that neighbor for at
least 90 seconds and therefor the session is forcefully closed with a hold
timer expired notification.

The send hold timer acts as a last resort to detect faulty peers. On an
idle session it can take a long time until this timer triggers but the
main goal here is to reset a stuck session at some point which did not
happen before.

With and OK job@

Revision 1.148 / (download) - annotate - [select for diffs], Fri Dec 11 12:00:01 2020 UTC (3 years, 5 months ago) by claudio
Branch: MAIN
Changes since 1.147: +13 -13 lines
Diff to previous 1.147 (colored)

Make the timer code independent of struct peer this way it can be used
in other places as well.
ok procter@

Revision 1.147 / (download) - annotate - [select for diffs], Thu Nov 5 11:28:11 2020 UTC (3 years, 7 months ago) by claudio
Branch: MAIN
Changes since 1.146: +3 -4 lines
Diff to previous 1.146 (colored)

Refactor the control code to be more like a module.
Change control_dispatch_msg() to return the change of control connection
count since the return value was not used before.
Add control_fill_pfds() to replace the TAILQ_FOREACH loop in session.c.
This allows to move the ctl_conns symbol to control.c (from session.h
where it caused issues when compiled with -fno-common).
OK benno@

Revision 1.146 / (download) - annotate - [select for diffs], Sun May 10 13:38:46 2020 UTC (4 years, 1 month ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8
Changes since 1.145: +2 -2 lines
Diff to previous 1.145 (colored)

In bgpctl argument parser, re-arrange 'reason' parsing ('nei action [reason]')
to be more generic,  then change 'reload' to take take a '[reason]' also,
which will be logged by bgpd.
ok kn claudio

Revision 1.145 / (download) - annotate - [select for diffs], Wed Feb 12 10:33:56 2020 UTC (4 years, 3 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.144: +2 -1 lines
Diff to previous 1.144 (colored)

Move the code to figure out the alternate IP address (IPv6 addr for IPv4
sessions and vice versa) from the RDE to the SE. The SE is the right place
for this since there getsockname(2) fetches the local address and so the
alternate one can be fetched there as well.
With this the route pledge is no longer needed in the RDE and the pledge
is now just "stdio recvfd".
OK benno@

Revision 1.144 / (download) - annotate - [select for diffs], Fri Jan 24 05:44:05 2020 UTC (4 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.143: +2 -1 lines
Diff to previous 1.143 (colored)

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

Revision 1.143 / (download) - annotate - [select for diffs], Tue Jan 21 11:12:06 2020 UTC (4 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.142: +3 -1 lines
Diff to previous 1.142 (colored)

Add last_rcvd_errcode and last_rcvd_suberr to the peer_stats so that
not only sent errors can be reported but also received ones.
OK denis@ deraadt@

Revision 1.142 / (download) - annotate - [select for diffs], Thu Jan 9 11:51:18 2020 UTC (4 years, 5 months ago) by claudio
Branch: MAIN
Changes since 1.141: +2 -2 lines
Diff to previous 1.141 (colored)

Convert last_updown and last_read from time(3) to use getmonotime()
which returns clock_gettime(2) with CLOCK_MONOTONIC. While doing that
introduce last_write for symetry.
OK denis@

Revision 1.141 / (download) - annotate - [select for diffs], Tue Oct 1 11:05:30 2019 UTC (4 years, 8 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.140: +4 -2 lines
Diff to previous 1.140 (colored)

Add some TCP MD5SUM specific calls needed by protable. On Linux systems
there is no pfkey interface and instead the loading is done via setsockopts.
To make this work correctly there are some additional functions needed when
peers get reconfigured or when new listeners show up.
OK benno@

Revision 1.140 / (download) - annotate - [select for diffs], Mon Sep 30 12:10:38 2019 UTC (4 years, 8 months ago) by claudio
Branch: MAIN
Changes since 1.139: +2 -2 lines
Diff to previous 1.139 (colored)

Pass a struct listen_addr pointer to tcp_md5_listen and not just the fd,
the linux shim needs this.

Revision 1.139 / (download) - annotate - [select for diffs], Mon May 27 09:14:33 2019 UTC (5 years ago) by claudio
Branch: MAIN
Changes since 1.138: +4 -2 lines
Diff to previous 1.138 (colored)

Switch the peer TAILQ to a RB tree indexed by the peer id. This way
getpeerbyid() gets a lot quicker at finding the peer when many peers
are configured. In my test case the difference is around 20% runtime.
OK denis@

Revision 1.138 / (download) - annotate - [select for diffs], Fri May 24 11:37:52 2019 UTC (5 years ago) by claudio
Branch: MAIN
Changes since 1.137: +3 -3 lines
Diff to previous 1.137 (colored)

Change timer_nextisdue() and timer_nextduein() to take the current time
as an argument. This way getmonotime() can be called once at the start
of looping over all peers instead of twice during the loop.
Makes a big difference with many peers.
OK florian@ sthen@

Revision 1.137 / (download) - annotate - [select for diffs], Wed May 8 12:41:55 2019 UTC (5 years, 1 month ago) by claudio
Branch: MAIN
Changes since 1.136: +5 -2 lines
Diff to previous 1.136 (colored)

Rework the TCP md5sig and IKE handling. Move the pfkey socket to the parent
process in this process. The refreshing of the keys is done whenever the
session state is changes to state IDLE or ACTIVE. This should behave better
when reloading configs with auth changes.
OK benno@

Revision 1.136 / (download) - annotate - [select for diffs], Sun Apr 7 10:52:30 2019 UTC (5 years, 2 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.135: +2 -1 lines
Diff to previous 1.135 (colored)

Be more careful when setting timeout to 0 because there is pending work
on a peer. Just checking the peer read buffer size is not enough since
the data present could be a partial message and so the SE should sleep
until a new POLLIN event fires. Adjust the logic by adding a rpending
flag that is only set if reading the session buffer was exited early
because MSG_PROCESS_LIMIT was hit.
OK benno@

Revision 1.135 / (download) - annotate - [select for diffs], Sun Mar 31 16:57:38 2019 UTC (5 years, 2 months ago) by claudio
Branch: MAIN
Changes since 1.134: +11 -13 lines
Diff to previous 1.134 (colored)

Move the struct peer into bgpd_config and switch it to a TAILQ instead of
the hand-rolled list. This changes the way peers are reloaded since now
both parent and session engine are now merging the lists.
OK denis@

Revision 1.134 / (download) - annotate - [select for diffs], Thu Mar 7 07:42:36 2019 UTC (5 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.133: +2 -2 lines
Diff to previous 1.133 (colored)

Do a better job at cleaning up the config on shutdown. Remove bits that
were missed before (e.g. network related objects). This helps to detect
memory leaks.
Start using new_config() and free_config() in all places where bgpd_config
structure are used. This way the struct is properly initialised and cleaned
up. Introduce copy_config() to only copy the values into the other struct
leaving the pointers as they were.
Looks good to benno@

Revision 1.133 / (download) - annotate - [select for diffs], Wed Feb 27 04:31:56 2019 UTC (5 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.132: +5 -3 lines
Diff to previous 1.132 (colored)

Convert the remote and local addresses in struct peer to be bgpd_addrs
instead of sockaddr_storage. This again helps protability and simplifies
some code. sa2addr now takes an optional pointer to return the port of
the sockaddr.
OK benno@

Revision 1.132 / (download) - annotate - [select for diffs], Tue Feb 19 09:13:23 2019 UTC (5 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.131: +17 -17 lines
Diff to previous 1.131 (colored)

Convert some (u_)int64_t to (unsigned) long long. Makes portability a bit
nicer since it requires less casts.
sigh deraadt@

Revision 1.131 / (download) - annotate - [select for diffs], Mon Feb 18 09:58:19 2019 UTC (5 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.130: +1 -2 lines
Diff to previous 1.130 (colored)

Move get_mpe_config() to kroute.c so that config.c does not depend on
system specific code.

Revision 1.130 / (download) - annotate - [select for diffs], Mon Feb 18 09:43:57 2019 UTC (5 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.129: +3 -2 lines
Diff to previous 1.129 (colored)

Do not depend on the length field of struct sockaddr instead pass the
length to the various functions needing it. Helps portability.
OK benno@

Revision 1.129 / (download) - annotate - [select for diffs], Mon Feb 11 15:44:25 2019 UTC (5 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.128: +3 -3 lines
Diff to previous 1.128 (colored)

The definition of VPNs in bgpd was never super elegant. The 'depend on
mpeX' config was a bit redundant. Also to make it more flexible (e.g. having
more than one mpeX interface per rdomain the syntax was changed.

To make this possible especially the network distribution logic had to be
adjusted and cleaned up. This should in general make network statements
well defined and conflicts between 'network A.B.C.D/N' and e.g. 'network static'
are handled in a well defined way ('network A.B.C.D/N' has preference).

With and OK dlg@, OK denis@

Revision 1.128 / (download) - annotate - [select for diffs], Sun Jan 20 23:27:48 2019 UTC (5 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.127: +2 -1 lines
Diff to previous 1.127 (colored)

Support group descriptions in control messages that accept a neighbor
description. With this it is possible to show rib a group of peers, to show
or signal a group of peers all at once.
OK sthen@ benno@

Revision 1.127 / (download) - annotate - [select for diffs], Thu Dec 27 20:23:24 2018 UTC (5 years, 5 months ago) by remi
Branch: MAIN
Changes since 1.126: +3 -2 lines
Diff to previous 1.126 (colored)

Check if a control socket or address is already in use befor using it.
If it is used abort startup or let a reload fail.
Sockets are now not unlinked anymore on regular shutdown.

This helps a lot when one tries to do a config check without -n.

Inputs and OK claudio@

Revision 1.126 / (download) - annotate - [select for diffs], Sat Dec 22 16:12:40 2018 UTC (5 years, 5 months ago) by claudio
Branch: MAIN
Changes since 1.125: +2 -1 lines
Diff to previous 1.125 (colored)

bgpctl can cause bgpd to do a lot of work (e.g. dumping all of the RIB)
but then bgpctl can quickly exit and bgpd still has to do all the work.
Instead introduce a terminate imsg to stop such long running commands if
bgpctl closes the connection before the run is over.
OK benno@, sthen@, deraadt@

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

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

Revision 1.124 / (download) - annotate - [select for diffs], Thu Sep 20 11:06:04 2018 UTC (5 years, 8 months ago) by benno
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.123: +2 -2 lines
Diff to previous 1.123 (colored)

whitespace cleanup, ok claudio@

Revision 1.123 / (download) - annotate - [select for diffs], Sun May 28 12:21:36 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.122: +3 -1 lines
Diff to previous 1.122 (colored)

Implement an XON/XOFF protocol between the RDE and the SE to throttle
per control session and peer the generation of imsg in the RDE. This
reduces the memory pressure in the SE substantially and also a bit in
the RDE. Makes the RDE more responsive for bgpctl commands.
Tested by me with 100 peers * 2000 prefixes and by phessler@ on an AMS-IX
border router with 200+ session. Convergance time got quite a bit better.
OK phessler@

Revision 1.122 / (download) - annotate - [select for diffs], Fri Jan 13 18:59:12 2017 UTC (7 years, 4 months ago) by phessler
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.121: +2 -1 lines
Diff to previous 1.121 (colored)

Add support for draft-ietf-idr-shutdown

    BGP state = Idle, marked down with shutdown reason "goodbye, we are
    upgrading to openbsd 6.1", down for 00:00:17

developed by Peter van Dijk <peter.van.dijk@powerdns.com> and Job
Snijders <job@ntt.net>, thank you!

OK benno@

Revision 1.121 / (download) - annotate - [select for diffs], Sun Oct 25 18:49:01 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.120: +3 -3 lines
Diff to previous 1.120 (colored)

Rename imsg_compose_parent and imsg_compose_rde to imsg_ctl_parent and
imsg_ctl_rde since these function should only be used by the control
code. Also switch ibuf_rde to ibuf_rde_ctl so that the control imsgs
don't need to queue behind all the incoming bgp UPDATES. This speeds
up 'bgpctl show' from taking minutes to a few seconds. The RDE was doing
this since a very long time but it seems the SE was not adjusted. Yikes

Revision 1.120 / (download) - annotate - [select for diffs], Sun Oct 11 19:25:06 2015 UTC (8 years, 7 months ago) by phessler
Branch: MAIN
Changes since 1.119: +4 -2 lines
Diff to previous 1.119 (colored)

some peers are following an expired draft RFC and are sending "unknown"
error codes to OPEN messages.  make them "known", and show them.

OK benno@, claudio@, sthen@

Revision 1.119 / (download) - annotate - [select for diffs], Mon Jul 20 16:10:38 2015 UTC (8 years, 10 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.118: +3 -3 lines
Diff to previous 1.118 (colored)

Make bgpd execute the RDE and session engine process instead of just forking.
This way ASLR and stack cookies are per process.
With input from benno@ and deraadt@
OK benno@

Revision 1.118 / (download) - annotate - [select for diffs], Thu Jul 16 18:26:04 2015 UTC (8 years, 10 months ago) by claudio
Branch: MAIN
Changes since 1.117: +3 -5 lines
Diff to previous 1.117 (colored)

Next round of config cleanup. Move various lists into the bgpd_config struct.
This is the next step to better split parsing and merging the config.
OK benno@

Revision 1.117 / (download) - annotate - [select for diffs], Mon Feb 9 11:37:31 2015 UTC (9 years, 4 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.116: +1 -7 lines
Diff to previous 1.116 (colored)

Kill session_socket_blockmode() and replace it with SOCK_CLOEXEC or
SOCK_NONBLOCK and accept4(). OK henning@ tested & OK benno@

Revision 1.116 / (download) - annotate - [select for diffs], Thu May 30 20:29:27 2013 UTC (11 years ago) by florian
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
Changes since 1.115: +2 -1 lines
Diff to previous 1.115 (colored)

When removing "dump (all|updates)" from bgpd.conf and reloading, tell
the session engine to actually stop logging.
Found the hard way by benno@.

with & ok benno@
input & ok claudio@

Revision 1.115 / (download) - annotate - [select for diffs], Thu Mar 7 21:26:28 2013 UTC (11 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.114: +2 -1 lines
Diff to previous 1.114 (colored)

Implements a few missing bits for better templates support:
- on config reload also adjust the cloned neighbors so that they get the
  config changes as well.
- clean up sessions that are 1h idle but in state active (instead of down)
- add bits to allow bgpctl to destroy cloned neighbors
Tested by sthen@ some time ago, OK phessler@

Revision 1.114 / (download) - annotate - [select for diffs], Wed Sep 12 05:56:22 2012 UTC (11 years, 8 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.113: +4 -1 lines
Diff to previous 1.113 (colored)

Better graceful restart support (implementing more then just the EoR record).
This implements only the "Restarting Client" bits of the RFC -- in other
words bgpd will keep the FIB when the client restarts but it will not do GR
when restarting itself. The capability is still off by default (you need
"announce restart yes" to enable it).
Tested by Anders Berggren. OK sthen@

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

accept() pacing for bgpd based on similar work done on other daemons.
OK henning@ sthen@

Revision 1.112 / (download) - annotate - [select for diffs], Sun Sep 18 09:31:25 2011 UTC (12 years, 8 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1
Changes since 1.111: +38 -32 lines
Diff to previous 1.111 (colored)

Reorder the headerfiles a bit. Move the bgpd specific prototypes out of
mrt.h. Now mrt.h includes only protocol specific defines.

Revision 1.111 / (download) - annotate - [select for diffs], Thu Dec 9 13:50:41 2010 UTC (13 years, 6 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.110: +2 -1 lines
Diff to previous 1.110 (colored)

The PF_KEY socket is like the routing socket. It must be polled all the
time to consume broadcasted messages or the socket gets full and own
messages that are needed are lost. This fixes an infinit loop in
pfkey_reply that happens when bgpd tcp md5sum is used on a system that
also runs a larger IPsec setup.
OK henning, lot of patience, debuging and testing by Thomas Boernert

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

Log sent notification messages as well having them in the log may
help to figure out the cause of flapping session faster.
OK henning@ sthen@

Revision 1.109 / (download) - annotate - [select for diffs], Fri Oct 15 07:45:32 2010 UTC (13 years, 7 months ago) by claudio
Branch: MAIN
Changes since 1.108: +8 -1 lines
Diff to previous 1.108 (colored)

Add the FSM suberrors specified in draft-ietf-idr-fsm-subcode. This
should help identifying FSM errors since the state is know known.
OK henning@ sthen@

Revision 1.108 / (download) - annotate - [select for diffs], Sun Jun 27 19:53:34 2010 UTC (13 years, 11 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.107: +2 -2 lines
Diff to previous 1.107 (colored)

Instead of specifying the control sockets on the command line have them
in bgpd.conf. This allows to add/modify restricted control sockets on runtime.
Feature request by a few people how often forgot to add -r path when restarting
bgpd (including myself).
NOTE: this removes the -s and -r arguments from bgpd so pay attention when
updateing.
jajaja sthen@, OK henning@

Revision 1.107 / (download) - annotate - [select for diffs], Wed May 26 13:56:07 2010 UTC (14 years ago) by nicm
Branch: MAIN
Changes since 1.106: +3 -3 lines
Diff to previous 1.106 (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.106 / (download) - annotate - [select for diffs], Mon May 17 15:49:29 2010 UTC (14 years ago) by claudio
Branch: MAIN
Changes since 1.105: +5 -3 lines
Diff to previous 1.105 (colored)

Last bits of MPLS VPN support. Hook kernel routing tables and RIB together.
This adds a bit of new config to specify the mapping between an rdomain and
the BGP MPLS VPN instance, example:
rdomain 1 {
        descr "CUSTOMER1"
	rd 65003:1
	import-target rt 65003:3
	export-target rt 65003:1
	depend on mpe0
	network 192.168.224/24
}
The "depend on mpe0" is a but ugly but for now this is the quickest way to
figure out which interface bgp should use to insert the MPLS routes.

A big side-effect of this diff is that networks are now internally
distributed through kroute.c.
This needs some kernel changes that will follow hopefully soon.
OK henning@

Revision 1.105 / (download) - annotate - [select for diffs], Mon May 3 13:09:38 2010 UTC (14 years, 1 month ago) by claudio
Branch: MAIN
Changes since 1.104: +2 -2 lines
Diff to previous 1.104 (colored)

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

Revision 1.104 / (download) - annotate - [select for diffs], Thu Dec 31 15:34:02 2009 UTC (14 years, 5 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.103: +4 -9 lines
Diff to previous 1.103 (colored)

Instead of passing the config via arguments to the childs on bootup issue
a config reload as first step in bootup. This allows childs to start with
an empty config and a lot of special cleanup code can bite the dust.
Testing by myself and sthen@ with a few configs (more testing welcome).
Seems like a good idea henning@ & sthen@

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

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

Revision 1.102 / (download) - annotate - [select for diffs], Wed Sep 2 08:06:42 2009 UTC (14 years, 9 months ago) by claudio
Branch: MAIN
Changes since 1.101: +2 -1 lines
Diff to previous 1.101 (colored)

Implement all of RFC 4486 BGP Cease Notification Message Subcodes.
The other side should now see why a session was dropped. e.g:
bgpd: ... received notification: Cease, administratively down
OK henning

Revision 1.101 / (download) - annotate - [select for diffs], Fri Jun 5 20:26:38 2009 UTC (15 years ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.100: +4 -3 lines
Diff to previous 1.100 (colored)

Adjust print_config to all the stuff added in the last days.

Revision 1.100 / (download) - annotate - [select for diffs], Thu Jun 4 04:46:42 2009 UTC (15 years ago) by claudio
Branch: MAIN
Changes since 1.99: +5 -4 lines
Diff to previous 1.99 (colored)

Add "rde rib <name>" to the config and allow the rde to use these other RIBs.
Still a bit hackish, reload is missing and printconf as well. Looks good h@

Revision 1.99 / (download) - annotate - [select for diffs], Thu Sep 11 14:49:58 2008 UTC (15 years, 9 months ago) by henning
Branch: MAIN
CVS Tags: OPENBSD_4_5_BASE, OPENBSD_4_5
Changes since 1.98: +2 -1 lines
Diff to previous 1.98 (colored)

remove hackery to un-demote after the session has been established for
a while, we can now just use a timer (since i rewrote the timer code)

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

timer_due is not needed any more

Revision 1.97 / (download) - annotate - [select for diffs], Thu May 8 07:43:03 2008 UTC (16 years, 1 month ago) by henning
Branch: MAIN
Changes since 1.96: +2 -1 lines
Diff to previous 1.96 (colored)

take advantage of the timewheel: instead of checking each an every
timer, just get the first off the queue and check wether it is due

Revision 1.96 / (download) - annotate - [select for diffs], Thu May 8 06:52:13 2008 UTC (16 years, 1 month ago) by henning
Branch: MAIN
Changes since 1.95: +28 -22 lines
Diff to previous 1.95 (colored)

change timer internals so that we use a timewheel (tailq, sorted by expiry
so that the timer that will expire first is always the first element,
and so on). will make the checking a bit faster and moreelegant and more
conveniant. ok claudio

Revision 1.95 / (download) - annotate - [select for diffs], Sun Dec 23 18:56:17 2007 UTC (16 years, 5 months ago) by henning
Branch: MAIN
CVS Tags: OPENBSD_4_3_BASE, OPENBSD_4_3
Changes since 1.94: +2 -1 lines
Diff to previous 1.94 (colored)

provide timer_nextduein, which provides the number of seconds until the
next timer expires.
use that in the session engine's mainloop, which simplifies it and
removes the last bits of timer internals knowledge from anywhere outside
timer.c.

Revision 1.94 / (download) - annotate - [select for diffs], Sun Dec 23 18:26:13 2007 UTC (16 years, 5 months ago) by henning
Branch: MAIN
Changes since 1.93: +8 -2 lines
Diff to previous 1.93 (colored)

send timers for bgpctlshow neighbor foo timer in seperate messages after
the peer data. makes bgpctl display code independent from timer
implementation internals. only running timers are displayed now, stopped
ones are skipped.

Revision 1.93 / (download) - annotate - [select for diffs], Thu Dec 20 17:08:48 2007 UTC (16 years, 5 months ago) by henning
Branch: MAIN
Changes since 1.92: +17 -1 lines
Diff to previous 1.92 (colored)

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

Revision 1.92 / (download) - annotate - [select for diffs], Mon Apr 23 13:04:24 2007 UTC (17 years, 1 month ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.91: +5 -2 lines
Diff to previous 1.91 (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.91 / (download) - annotate - [select for diffs], Fri Apr 6 18:03:51 2007 UTC (17 years, 2 months ago) by claudio
Branch: MAIN
Changes since 1.90: +5 -1 lines
Diff to previous 1.90 (colored)

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

Revision 1.90 / (download) - annotate - [select for diffs], Fri Jan 26 17:40:49 2007 UTC (17 years, 4 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.89: +3 -3 lines
Diff to previous 1.89 (colored)

Massiv rework of the control imsg flow. Main changes:
- dedicated pipe between the SE and the RDE for control messages
- restartable RB tree dumps in the RDE
- queuing limits both in the SE and RDE
The result is a dramatic decrease of memory consumption on operations like
bgpctl show rib. Previously all messages where first stored in the RDE
then passed to the SE where they got queued in case bgpctl was not fast enough.
Now only a small number of messages is generated and passed to the SE and
the SE has an additional limit instead of acting like an infinite buffer.
Without this the bgpd on bgpd.networx.ch would not survive a single minute.
looks good henning@

Revision 1.89 / (download) - annotate - [select for diffs], Thu Jan 4 12:43:36 2007 UTC (17 years, 5 months ago) by claudio
Branch: MAIN
Changes since 1.88: +3 -2 lines
Diff to previous 1.88 (colored)

Do not run rde_shutdown() unless bgpd is started with -d.
On some of my systems rde_shutdown() takes more than 3min doing nothing more
than calling free(3) over and over again.

Revision 1.81.2.1 / (download) - annotate - [select for diffs], Sat Nov 4 19:53:37 2006 UTC (17 years, 7 months ago) by brad
Branch: OPENBSD_3_9
Changes since 1.81: +8 -2 lines
Diff to previous 1.81 (colored) next main 1.82 (colored)

MFC:
Fix by henning@

rev 1.33
make sure we keep copies of everything we need to
remove SAs and flows later again, even if the
configuration info changed due to reload.

rev 1.34
storing the dynamically acquired SPIs for tcpmd5 inside the conf struct
is not such a good idea - it gets nulled on config reloads, and thus
we fail to clear the old SAs when the session is restarted after a config
reload occured. obvious solution: store the SPIs outside the config
area.

ok henning@

Revision 1.86.2.1 / (download) - annotate - [select for diffs], Sat Nov 4 05:19:06 2006 UTC (17 years, 7 months ago) by brad
Branch: OPENBSD_4_0
Changes since 1.86: +8 -2 lines
Diff to previous 1.86 (colored) next main 1.87 (colored)

MFC:
Fix by henning@

rev 1.33
make sure we keep copies of everything we need to
remove SAs and flows later again, even if the
configuration info changed due to reload.

rev 1.34
storing the dynamically acquired SPIs for tcpmd5 inside the conf struct
is not such a good idea - it gets nulled on config reloads, and thus
we fail to clear the old SAs when the session is restarted after a config
reload occured. obvious solution: store the SPIs outside the config
area.

ok henning@

Revision 1.88 / (download) - annotate - [select for diffs], Thu Oct 26 14:26:49 2006 UTC (17 years, 7 months ago) by henning
Branch: MAIN
Changes since 1.87: +3 -1 lines
Diff to previous 1.87 (colored)

        * make sure we keep copies of everything we need to
        * remove SAs and flows later again, even if the
        * configuration info changed due to reload.
        * We need: SPIs, method, local_addr, remote_addr.
        * remote_addr cannot change, so no copy.
with this, I have just migrated a session from tcp md5sig to ipsec esp ike,
just with bgpctl reload (both sides) followed by bgpctl neighbor $foo clear
(just one side)!
claudio ok

Revision 1.87 / (download) - annotate - [select for diffs], Thu Oct 26 13:17:00 2006 UTC (17 years, 7 months ago) by henning
Branch: MAIN
Changes since 1.86: +6 -2 lines
Diff to previous 1.86 (colored)

storing the dynamically acquired SPIs for tcpmd5 inside the conf struct
is not such a good idea - it gets nulled on config reloads, and thus
we fail to clear the old SAs when the session is restarted after a config
reload occured. obvious solution: store the SPIs outside the config area.
ok claudio

Revision 1.86 / (download) - annotate - [select for diffs], Sun Aug 27 16:11:05 2006 UTC (17 years, 9 months ago) by henning
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE
Branch point for: OPENBSD_4_0
Changes since 1.85: +3 -2 lines
Diff to previous 1.85 (colored)

add code to announce the restart capability according to
draft-ietf-idr-restart. Do not announce actual restart capabilities,
so that this only serves as indicator that we are capable of sending
and receiving the End-of-RIB marker.
leave disabled for now, since the code to actually send the EoR-marker
is currently ifdef'd out (to be fixed soon) and we wanna play safe for
4.0. and juniper doesn't support that capability (which is not a problem
per se) and at the same time has its capability negotiation code completely
fucked up, if a capability is rejected they don't indicate WHICH capability
they reject (which makes that a problem, tho still a small one and we cope).
claudio ok

Revision 1.85 / (download) - annotate - [select for diffs], Fri Jul 28 15:04:34 2006 UTC (17 years, 10 months ago) by henning
Branch: MAIN
Changes since 1.84: +7 -1 lines
Diff to previous 1.84 (colored)

factor out the code to build bgp messages, ok claudio a long time ago

Revision 1.84 / (download) - annotate - [select for diffs], Sat Jun 17 14:06:09 2006 UTC (17 years, 11 months ago) by henning
Branch: MAIN
Changes since 1.83: +9 -1 lines
Diff to previous 1.83 (colored)

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 1.83 / (download) - annotate - [select for diffs], Sat May 27 15:43:13 2006 UTC (18 years ago) by claudio
Branch: MAIN
Changes since 1.82: +2 -2 lines
Diff to previous 1.82 (colored)

Cleanup with lint. Make the poll fd indexes unsigned and because of that
control_accept should also return a unsigned int. Remove old prototype.

Revision 1.82 / (download) - annotate - [select for diffs], Tue May 23 12:11:38 2006 UTC (18 years ago) by henning
Branch: MAIN
Changes since 1.81: +2 -1 lines
Diff to previous 1.81 (colored)

allow bgpd to request a route refresh from a neighbor if that neighbor
announced route refresh capabilities

Revision 1.81 / (download) - annotate - [select for diffs], Tue Jan 24 10:03:44 2006 UTC (18 years, 4 months ago) by henning
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE
Branch point for: OPENBSD_3_9
Changes since 1.80: +6 -4 lines
Diff to previous 1.80 (colored)

introduce a second control socket, which is restricted to certain messages,
nameley the show ones. needed for looking glass style applications,
monitoring etc. claudio ok

Revision 1.80 / (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.79: +1 -2 lines
Diff to previous 1.79 (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.79 / (download) - annotate - [select for diffs], Wed Oct 19 10:26:21 2005 UTC (18 years, 7 months ago) by henning
Branch: MAIN
Changes since 1.78: +2 -1 lines
Diff to previous 1.78 (colored)

on "bgpctl neighbor foo clear", we used to send a STOP event immediately
followed by a START event. Instead of sending START immediately, start the
IdleHoldTimer with a very low value (5 seconds) so that we restart the
session these seconds later. some other implementations deal poorly with
our previously superfast reconnects, namely, that commercial one from
san jose, claudio ok

Revision 1.78 / (download) - annotate - [select for diffs], Mon Sep 19 16:15:54 2005 UTC (18 years, 8 months ago) by henning
Branch: MAIN
Changes since 1.77: +3 -1 lines
Diff to previous 1.77 (colored)

implement fast reconnects
when a peer drops to IDLE, we have to force him in IDLE for some time to
prevent fast flapping. however, the forced idle time is annoying when the
connection could be re-established immediately, i. e. bgpctl nei $peer clear
or similar.
implement an error counter per peer, increased every time we receive a
notification. when we are in state IDLE and get a connection from the peer
in question, check if the error counter is 1 or smaller. if so, change state
to active and accept the connection, otherwise keep the current behaviour
and reject the connection.
the error counter gets scaled back by the IdleHoldResetTimer that scales the
IdleHoldTime back as well

Revision 1.77 / (download) - annotate - [select for diffs], Sat Jun 4 22:50:20 2005 UTC (19 years ago) by henning
Branch: MAIN
CVS Tags: OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.76: +3 -1 lines
Diff to previous 1.76 (colored)

when sending out a notification record the error code and suberror code in
the peer stats struct, and clear them as soon as the session leaves IDLE

Revision 1.76 / (download) - annotate - [select for diffs], Tue Apr 5 17:37:44 2005 UTC (19 years, 2 months ago) by henning
Branch: MAIN
Changes since 1.75: +2 -2 lines
Diff to previous 1.75 (colored)

magic police, Jason Ackley <jason@ackley.net>

Revision 1.75 / (download) - annotate - [select for diffs], Thu Dec 23 17:24:03 2004 UTC (19 years, 5 months ago) by henning
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_7
Changes since 1.74: +2 -1 lines
Diff to previous 1.74 (colored)

introduce getpeerbydesc(), find a peer by its description

Revision 1.74 / (download) - annotate - [select for diffs], Thu Dec 23 15:15:55 2004 UTC (19 years, 5 months ago) by henning
Branch: MAIN
Changes since 1.73: +2 -1 lines
Diff to previous 1.73 (colored)

lower latency by processing no more than 25 messages at once for each peer

Revision 1.73 / (download) - annotate - [select for diffs], Thu Dec 23 15:08:43 2004 UTC (19 years, 5 months ago) by henning
Branch: MAIN
Changes since 1.72: +14 -14 lines
Diff to previous 1.72 (colored)

sort structs for most optimal alignment, help mickey, claudio ok

Revision 1.72 / (download) - annotate - [select for diffs], Thu Nov 18 17:07:38 2004 UTC (19 years, 6 months ago) by henning
Branch: MAIN
Changes since 1.71: +1 -7 lines
Diff to previous 1.71 (colored)

add an instance of struct capabilities to peer_conf, and inherit
peer->capa.ann from this

Revision 1.71 / (download) - annotate - [select for diffs], Thu Nov 18 16:38:05 2004 UTC (19 years, 6 months ago) by henning
Branch: MAIN
Changes since 1.70: +6 -6 lines
Diff to previous 1.70 (colored)

inside struct peer, replace the occurance of the older struct peer_capa
by two instances of the new struct capabilities, one for announcements
and one for the received capabilities

Revision 1.70 / (download) - annotate - [select for diffs], Thu Nov 18 16:30:05 2004 UTC (19 years, 6 months ago) by henning
Branch: MAIN
Changes since 1.69: +1 -2 lines
Diff to previous 1.69 (colored)

remove the global 'announce' flag from struct peer_capa, clear
individual capability flags where needed

Revision 1.69 / (download) - annotate - [select for diffs], Thu Nov 18 15:24:49 2004 UTC (19 years, 6 months ago) by henning
Branch: MAIN
Changes since 1.68: +1 -7 lines
Diff to previous 1.68 (colored)

struct capa_mp is not needed any more, spotted by claudio

Revision 1.68 / (download) - annotate - [select for diffs], Thu Nov 18 14:59:50 2004 UTC (19 years, 6 months ago) by henning
Branch: MAIN
Changes since 1.67: +3 -2 lines
Diff to previous 1.67 (colored)

add code to announce support for IPv6 Unicast.
disabled for now, claudio ok

Revision 1.67 / (download) - annotate - [select for diffs], Thu Nov 18 14:30:10 2004 UTC (19 years, 6 months ago) by henning
Branch: MAIN
Changes since 1.66: +2 -2 lines
Diff to previous 1.66 (colored)

it's oupsa oupsa oupsa time...
writing to a member of a const struct is no good, so un-const struct peer
for log_statechange()

Revision 1.66 / (download) - annotate - [select for diffs], Thu Nov 18 14:10:36 2004 UTC (19 years, 6 months ago) by henning
Branch: MAIN
Changes since 1.65: +2 -1 lines
Diff to previous 1.65 (colored)

supress logging of subsequent connect() failures as long as:
-the session alternates between Active and Connect. Other states reset logging
-the error is the same as the last connect() error seen
jajajaja claudio

Revision 1.65 / (download) - annotate - [select for diffs], Tue Nov 2 10:56:48 2004 UTC (19 years, 7 months ago) by henning
Branch: MAIN
Changes since 1.64: +2 -1 lines
Diff to previous 1.64 (colored)

save the previous state in struct peer, claudio ok

Revision 1.64 / (download) - annotate - [select for diffs], Tue Oct 19 12:02:50 2004 UTC (19 years, 7 months ago) by henning
Branch: MAIN
Changes since 1.63: +2 -1 lines
Diff to previous 1.63 (colored)

allow neighbor definitions to depend on interface state.
with this, if a neighbor is configured as dependent on carp0 for example,
the neighbor will remain in state IDLE as long as carp0 is not master.
once carp0 becomes master the session(s) depending on it immediately
go to CONNECT (or ACTIVE, if they're configured passive), reducing failover
time. claudio ok, with some input from ryan as well

Revision 1.63 / (download) - annotate - [select for diffs], Wed Sep 22 08:46:28 2004 UTC (19 years, 8 months ago) by henning
Branch: MAIN
Changes since 1.62: +2 -4 lines
Diff to previous 1.62 (colored)

don't bother shrinking the pfd and index2peer arrays
ok claudio

Revision 1.62 / (download) - annotate - [select for diffs], Thu Sep 16 17:44:36 2004 UTC (19 years, 8 months ago) by henning
Branch: MAIN
Changes since 1.61: +2 -1 lines
Diff to previous 1.61 (colored)

when a cloned peer goes back to IDLE state, don't remove him immediately
but keep him around for some more time (an hour here).
fixes an issue Arvid was reporting: when a cloned neighbor rejects our OPEN
message due to capability negotiation (or missing implementation of those),
we set a marker and retry without. However, if we remove the peer immediately,
it gets freshly cloned on the next trial, with default settings, thus including
capability negotiation, and thus failes again.
this will also help with route flap dampening.
ok claudio

Revision 1.61 / (download) - annotate - [select for diffs], Fri Aug 6 11:51:19 2004 UTC (19 years, 10 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_3_6_BASE, OPENBSD_3_6
Changes since 1.60: +2 -1 lines
Diff to previous 1.60 (colored)

Forward IMSG_CTL_SHOW_NEIGHBOR messages to the rde so that we can report
the current and max prefix count back to bgpctl. OK henning@

Revision 1.60 / (download) - annotate - [select for diffs], Thu Aug 5 21:01:38 2004 UTC (19 years, 10 months ago) by claudio
Branch: MAIN
Changes since 1.59: +2 -2 lines
Diff to previous 1.59 (colored)

The peer_l is not needed in the rde but still allocated, free them and
save 1k per peer. OK henning@

Revision 1.59 / (download) - annotate - [select for diffs], Wed Aug 4 12:41:48 2004 UTC (19 years, 10 months ago) by henning
Branch: MAIN
Changes since 1.58: +3 -3 lines
Diff to previous 1.58 (colored)

session_main() and rde_main() return... right, a pid. and a pid is a pid_t
and not an int.

Revision 1.58 / (download) - annotate - [select for diffs], Sun Jul 4 03:51:31 2004 UTC (19 years, 11 months ago) by henning
Branch: MAIN
Changes since 1.57: +3 -3 lines
Diff to previous 1.57 (colored)

2 more file descriptors for each RDE and SE inherited from the parent
we should close

Revision 1.57 / (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.56: +2 -2 lines
Diff to previous 1.56 (colored)

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

Revision 1.56 / (download) - annotate - [select for diffs], Sun Jun 20 17:49:46 2004 UTC (19 years, 11 months ago) by henning
Branch: MAIN
Changes since 1.55: +2 -1 lines
Diff to previous 1.55 (colored)

implement file descriptor passing in the imsg/msgbuf framework, and use
it to let the main process to prepare new listening sockets (socket() and
bind()) on behalf of the session engine, which of course cannot bind() to
ports < 1024 any more once it dropped privileges. with some help from theo,
claudio ok

Revision 1.55 / (download) - annotate - [select for diffs], Wed Jun 9 13:01:44 2004 UTC (20 years ago) by henning
Branch: MAIN
Changes since 1.54: +5 -4 lines
Diff to previous 1.54 (colored)

move to a dynamically allocated struct pollfd array.
we used a ststic one with OPEN_MAX entries, which is a rather arbitary limit
as OPEN_MAX is _not_ the max # of open fds we can have, but just a default
for that setting.
in the same move we have to allocate the peer_l array, basically there
for pfd-index to peer pointers to prevent peer list scans all time,
dynamiccaly to. we overallocate a little and use that reserve until we
have to realloc again later to prevent reallocs for every single control
connection or a single flapping peer.
help & ok claudio

Revision 1.54 / (download) - annotate - [select for diffs], Sun Jun 6 17:38:10 2004 UTC (20 years ago) by henning
Branch: MAIN
Changes since 1.53: +2 -2 lines
Diff to previous 1.53 (colored)

rework bgpd's handling of listening sockets. instead of one for each
supported address familiy, keep a tailq of an arbitary number of them.
the new struct listen_addr contains the sockaddr and the fd.
this fixes quite some nasty behaviour which was a consequence of the previous
model.
looks right deraadt@, and discussed with claudio

Revision 1.53 / (download) - annotate - [select for diffs], Fri May 28 18:39:09 2004 UTC (20 years ago) by henning
Branch: MAIN
Changes since 1.52: +9 -4 lines
Diff to previous 1.52 (colored)

detect absence of PF_KEY interface and/or the TCP_MD5SIG setsockopts
at runtime and disable said subsystems if so. helps the guys porting bgpd
to $otherBSD, and is actually the right thing to do. claudio ok

Revision 1.52 / (download) - annotate - [select for diffs], Sat May 8 18:21:55 2004 UTC (20 years, 1 month ago) by henning
Branch: MAIN
Changes since 1.51: +2 -1 lines
Diff to previous 1.51 (colored)

provide log_sockaddr, which uses getnameinfo(), and use it in
log_conn_attempt

Revision 1.51 / (download) - annotate - [select for diffs], Sat May 8 11:22:43 2004 UTC (20 years, 1 month ago) by henning
Branch: MAIN
Changes since 1.50: +2 -2 lines
Diff to previous 1.50 (colored)

remove unused argument to control_dispatch_msg(), lint

Revision 1.50 / (download) - annotate - [select for diffs], Wed Apr 28 17:42:27 2004 UTC (20 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.49: +2 -2 lines
Diff to previous 1.49 (colored)

rename sock to fd

Revision 1.49 / (download) - annotate - [select for diffs], Wed Apr 28 06:45:37 2004 UTC (20 years, 1 month ago) by henning
Branch: MAIN
Changes since 1.48: +3 -1 lines
Diff to previous 1.48 (colored)

if a peer follows the extremely misgiuded path that the RFCs just barely allow
to send a NOTIFICATION and thus ternminating the session when it sees a
capability it doesn't support (who would guess: zebra does so), parse the
data section of the notifcication to find out what what capabilties it didn't
like and do not advertise them the next time the session gets up. In case we
get a notification about unsupported capabilities with an empty data part
(don't ask for RFCs... and guess who does that), disable capabilty announcement
alltogether.
claudio ok

Revision 1.48 / (download) - annotate - [select for diffs], Wed Apr 28 02:57:01 2004 UTC (20 years, 1 month ago) by henning
Branch: MAIN
Changes since 1.47: +2 -1 lines
Diff to previous 1.47 (colored)

keep track of which ipsec/md5 SAs we inserted - ESRCH on blind removal
otherwise, markus ok

Revision 1.47 / (download) - annotate - [select for diffs], Tue Apr 27 22:42:13 2004 UTC (20 years, 1 month ago) by henning
Branch: MAIN
Changes since 1.46: +1 -7 lines
Diff to previous 1.46 (colored)

rename the ipsec struct to auth, move all tcpmd5 related fields in there, and
add a generic "method" field that expresses what method
(none/md5sig/ipsec manual/ipsec ike) is in use
markus ok

Revision 1.46 / (download) - annotate - [select for diffs], Tue Apr 27 03:53:43 2004 UTC (20 years, 1 month ago) by henning
Branch: MAIN
Changes since 1.45: +6 -2 lines
Diff to previous 1.45 (colored)

initial route refresh support per RFC2918
process incoming route refresh request and notify the RDE
not advertised via capabilities yet, claudio ok

Revision 1.45 / (download) - annotate - [select for diffs], Mon Apr 26 09:35:39 2004 UTC (20 years, 1 month ago) by markus
Branch: MAIN
Changes since 1.44: +3 -3 lines
Diff to previous 1.44 (colored)

load ipsec SAs into the kernel and enable them.

Revision 1.44 / (download) - annotate - [select for diffs], Mon Apr 26 01:43:13 2004 UTC (20 years, 1 month ago) by henning
Branch: MAIN
Changes since 1.43: +7 -1 lines
Diff to previous 1.43 (colored)

announce multiprotocol capabilities - IPv4 multicast for now
this implies ourgoing capabilities annoucnement is there and just needs the
values to be filled in for other shitz we'll support soonish

Revision 1.43 / (download) - annotate - [select for diffs], Sun Apr 25 17:34:39 2004 UTC (20 years, 1 month ago) by claudio
Branch: MAIN
Changes since 1.42: +2 -2 lines
Diff to previous 1.42 (colored)

Remove the no longer needed configure stuff in RDE. The peer list needs no
longer to be synced between parent, SE and RDE. OK henning@

Revision 1.42 / (download) - annotate - [select for diffs], Fri Apr 16 04:52:26 2004 UTC (20 years, 1 month ago) by henning
Branch: MAIN
Changes since 1.41: +1 -1 lines
Diff to previous 1.41 (colored)

let getpeerbyip work for both v4 and v6

Revision 1.41 / (download) - annotate - [select for diffs], Fri Apr 16 04:47:19 2004 UTC (20 years, 1 month ago) by henning
Branch: MAIN
Changes since 1.40: +2 -2 lines
Diff to previous 1.40 (colored)

make log_conn_attempt work in an address family independent matter

Revision 1.40 / (download) - annotate - [select for diffs], Tue Apr 13 22:53:29 2004 UTC (20 years, 2 months ago) by henning
Branch: MAIN
Changes since 1.39: +4 -1 lines
Diff to previous 1.39 (colored)

parse the BGP Multiprotocol Extensions (RFC 2858) capabilities and store in
the peer struct, claudio ok

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

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

Revision 1.38 / (download) - annotate - [select for diffs], Thu Mar 11 13:35:06 2004 UTC (20 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.37: +2 -2 lines
Diff to previous 1.37 (colored)

Free unneeded mrt lists in SE and on exit. OK henning@

Revision 1.37 / (download) - annotate - [select for diffs], Wed Mar 10 15:15:48 2004 UTC (20 years, 3 months ago) by henning
Branch: MAIN
Changes since 1.36: +3 -2 lines
Diff to previous 1.36 (colored)

pass a pointer to the network list as well to session_main so we can free()
the members after fork

Revision 1.36 / (download) - annotate - [select for diffs], Wed Mar 10 14:45:25 2004 UTC (20 years, 3 months ago) by henning
Branch: MAIN
Changes since 1.35: +4 -4 lines
Diff to previous 1.35 (colored)

pass a pointer to the filter rule list to session_main() so we can free()
the list entries and the head there after forking

Revision 1.35 / (download) - annotate - [select for diffs], Wed Mar 10 11:38:33 2004 UTC (20 years, 3 months ago) by henning
Branch: MAIN
Changes since 1.34: +12 -1 lines
Diff to previous 1.34 (colored)

implement framework to announce capabilities in the open messages we send.
this includes handling "unsupported optional parameter" notifications from the
peer and retrying without capability announcement. claudio ok

Revision 1.34 / (download) - annotate - [select for diffs], Fri Mar 5 21:44:26 2004 UTC (20 years, 3 months ago) by henning
Branch: MAIN
Changes since 1.33: +3 -2 lines
Diff to previous 1.33 (colored)

new error code "unsupported capability" from RFC 3392

Revision 1.33 / (download) - annotate - [select for diffs], Fri Mar 5 20:25:30 2004 UTC (20 years, 3 months ago) by henning
Branch: MAIN
Changes since 1.32: +7 -1 lines
Diff to previous 1.32 (colored)

add a parser for the capability announcements using the OPEN message as per
RFC 3392. we don't support any capability yet but this at least avoids one
session teardown and reestablishment when talking to peers which do support
capability announcement (as in: basically any) and we'll start supporting
some soon.

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

Forgotten in the last commit. Sync printconfig and parser.

Revision 1.31 / (download) - annotate - [select for diffs], Thu Feb 26 16:16:41 2004 UTC (20 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.30: +2 -1 lines
Diff to previous 1.30 (colored)

show rib infrastructure. At least full dumps and per as dumps. Per prefix
dump need some more work. OK henning@

Revision 1.30 / (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.29: +1 -10 lines
Diff to previous 1.29 (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.29 / (download) - annotate - [select for diffs], Mon Feb 9 23:16:46 2004 UTC (20 years, 4 months ago) by henning
Branch: MAIN
Changes since 1.28: +3 -2 lines
Diff to previous 1.28 (colored)

print networks too

Revision 1.28 / (download) - annotate - [select for diffs], Mon Feb 9 01:38:55 2004 UTC (20 years, 4 months ago) by henning
Branch: MAIN
Changes since 1.27: +2 -2 lines
Diff to previous 1.27 (colored)

print more fluff

Revision 1.27 / (download) - annotate - [select for diffs], Sun Feb 8 23:44:57 2004 UTC (20 years, 4 months ago) by henning
Branch: MAIN
Changes since 1.26: +4 -1 lines
Diff to previous 1.26 (colored)

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

Revision 1.26 / (download) - annotate - [select for diffs], Sat Feb 7 11:42:30 2004 UTC (20 years, 4 months ago) by henning
Branch: MAIN
Changes since 1.25: +2 -2 lines
Diff to previous 1.25 (colored)

send filter rules to the RDE on reloads, help & ok claudio

Revision 1.25 / (download) - annotate - [select for diffs], Fri Feb 6 20:18:18 2004 UTC (20 years, 4 months ago) by henning
Branch: MAIN
Changes since 1.24: +2 -2 lines
Diff to previous 1.24 (colored)

initial cut at the filtering language.
structs etc to describe a rule, filter rule list management
parser groks filter defs now.

claudio ok, discussion & help also jakob theo

Revision 1.24 / (download) - annotate - [select for diffs], Wed Jan 28 17:57:08 2004 UTC (20 years, 4 months ago) by henning
Branch: MAIN
Changes since 1.23: +2 -1 lines
Diff to previous 1.23 (colored)

we need a pfkey_init the gets us a PF_KEY socket before we drop privs
eases other code quite a bit in exchange...

Revision 1.23 / (download) - annotate - [select for diffs], Wed Jan 28 17:27:55 2004 UTC (20 years, 4 months ago) by henning
Branch: MAIN
Changes since 1.22: +11 -1 lines
Diff to previous 1.22 (colored)

-struct peer_auth to store the SPIs, linked into struct peer
-add pfkey_auth_establish(), which sets up flows for both directions and
 stores the SPIs in above struct
-add (yet dummy) pfkey_auth_remove()

with markus, ok claudio markus

Revision 1.22 / (download) - annotate - [select for diffs], Thu Jan 22 20:59:17 2004 UTC (20 years, 4 months ago) by henning
Branch: MAIN
Changes since 1.21: +1 -3 lines
Diff to previous 1.21 (colored)

make log_peer_* take a struct peer_config instead of the session engine
specific struct peer, and move their prototypes to bgpd.h to make it available
to whole bgpd

ok claudio@

Revision 1.21 / (download) - annotate - [select for diffs], Thu Jan 22 19:07:34 2004 UTC (20 years, 4 months ago) by henning
Branch: MAIN
Changes since 1.20: +3 -3 lines
Diff to previous 1.20 (colored)

log_peer_err -> log_peer_warn
log_peer_errx -> log_peer_warnx

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

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

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

clean up setting the poll events a bit. no functional changes.

Revision 1.18 / (download) - annotate - [select for diffs], Sun Jan 11 01:04:43 2004 UTC (20 years, 5 months ago) by henning
Branch: MAIN
Changes since 1.17: +4 -1 lines
Diff to previous 1.17 (colored)

once the tcp session is established use gettsockname/getpeername to get
local/remote sockaddr and store it in the peer struct

ok claudio@

Revision 1.17 / (download) - annotate - [select for diffs], Fri Jan 9 13:47:08 2004 UTC (20 years, 5 months ago) by henning
Branch: MAIN
Changes since 1.16: +2 -2 lines
Diff to previous 1.16 (colored)

get us a stateful imsg relaying framework, and the first receiver,
IMSG_CTL_KROUTE, to have the kroute structs forming the fib sent to a
control socket.

ok claudio@

Revision 1.16 / (download) - annotate - [select for diffs], Tue Jan 6 23:14:58 2004 UTC (20 years, 5 months ago) by henning
Branch: MAIN
Changes since 1.15: +2 -1 lines
Diff to previous 1.15 (colored)

two new imsg types, IMSG_CTL_NEIGHBOR_UP and _DOWN, on their receival on the
control socket the given neighbor session is sent a START / STOP signal.

ok claudio@

Revision 1.15 / (download) - annotate - [select for diffs], Tue Jan 6 19:21:22 2004 UTC (20 years, 5 months ago) by henning
Branch: MAIN
Changes since 1.14: +2 -2 lines
Diff to previous 1.14 (colored)

lower the initial value for the IdleHold timer from 90 to 30 seconds.
90 is too much, and now that the punishment works as intended oscillating
peers get slowed down by that

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

properly punish oscillating neighbors.
previously we were to forgiving so the punishment didn't kick in as
intended

Revision 1.13 / (download) - annotate - [select for diffs], Tue Jan 6 18:01:27 2004 UTC (20 years, 5 months ago) by henning
Branch: MAIN
Changes since 1.12: +4 -4 lines
Diff to previous 1.12 (colored)

rename our StartTimer to IdleHoldTimer as per draft-ietf-idr-bgp4-23

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

2004

Revision 1.11 / (download) - annotate - [select for diffs], Mon Jan 5 22:57:58 2004 UTC (20 years, 5 months ago) by claudio
Branch: MAIN
Changes since 1.10: +2 -2 lines
Diff to previous 1.10 (colored)

Big overhaul of the mrt code.
Dumping of incomming bgp messages is now possible and dumping the (not yet)
filtered updates works too. Per neighbor dumps are still missing.
OK henning@

Revision 1.10 / (download) - annotate - [select for diffs], Sun Jan 4 20:07:30 2004 UTC (20 years, 5 months ago) by henning
Branch: MAIN
Changes since 1.9: +9 -3 lines
Diff to previous 1.9 (colored)

keep seperate message counters for open/update/keepalive/notification

Revision 1.9 / (download) - annotate - [select for diffs], Sun Jan 4 19:39:46 2004 UTC (20 years, 5 months ago) by henning
Branch: MAIN
Changes since 1.8: +2 -2 lines
Diff to previous 1.8 (colored)

-new imsg CTL_RELOAD
-upong receival in the SE forward to parent
-make sending messages from SE to parent work for that (was not required before)
-parent reacts to that just like a SIGHUP, reread config file

Revision 1.8 / (download) - annotate - [select for diffs], Sun Jan 4 18:51:23 2004 UTC (20 years, 5 months ago) by henning
Branch: MAIN
Changes since 1.7: +5 -3 lines
Diff to previous 1.7 (colored)

allow "show neighbor" to be limited to one specific neighbor

Revision 1.7 / (download) - annotate - [select for diffs], Sat Jan 3 22:44:29 2004 UTC (20 years, 5 months ago) by henning
Branch: MAIN
Changes since 1.6: +4 -1 lines
Diff to previous 1.6 (colored)

keep track of last session up/down and last successfull read

Revision 1.6 / (download) - annotate - [select for diffs], Sat Jan 3 22:18:58 2004 UTC (20 years, 5 months ago) by henning
Branch: MAIN
Changes since 1.5: +7 -1 lines
Diff to previous 1.5 (colored)

add message counters

Revision 1.5 / (download) - annotate - [select for diffs], Sat Jan 3 20:37:34 2004 UTC (20 years, 5 months ago) by henning
Branch: MAIN
Changes since 1.4: +75 -1 lines
Diff to previous 1.4 (colored)

move some session specific stuff to session.h and make the few files
that need it include that

Revision 1.4 / (download) - annotate - [select for diffs], Sat Jan 3 20:22:07 2004 UTC (20 years, 5 months ago) by henning
Branch: MAIN
Changes since 1.3: +2 -2 lines
Diff to previous 1.3 (colored)

decouple the peer list from bgpd_config.
so many parts of bgpd are not at all interested in the session specific peer
structs... allows for some further cleaning

Revision 1.3 / (download) - annotate - [select for diffs], Thu Jan 1 23:46:47 2004 UTC (20 years, 5 months ago) by henning
Branch: MAIN
Changes since 1.2: +17 -1 lines
Diff to previous 1.2 (colored)

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

Revision 1.2 / (download) - annotate - [select for diffs], Fri Dec 19 21:07:05 2003 UTC (20 years, 5 months ago) by henning
Branch: MAIN
Changes since 1.1: +1 -21 lines
Diff to previous 1.1 (colored)

zap the msg_ struct we don't ever use

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

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

not connected to the builds yet.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.