1
0
mirror of https://github.com/bgp/stayrtr.git synced 2024-05-06 15:54:54 +00:00

402 Commits

Author SHA1 Message Date
febec67d0d Merge pull request #119 from ties/only-parse-broken-file-once
Use debug level logging for hash change
2024-03-01 12:40:25 +01:00
4900445114 Use debug level logging for hash change 2024-03-01 12:18:08 +01:00
8adf6b553e Merge pull request #118 from ties/only-parse-broken-file-once
Store hash before decoding, do not parse broken file twice
2024-03-01 11:47:38 +01:00
4c1c8fab66 Store hash before decoding, do not parse broken file twice 2024-03-01 10:50:24 +01:00
b93d7a8477 Merge pull request #117 from cjeker/avoid_empty_deltas
Avoid adding empty deltas to the cache
2024-03-01 09:36:03 +01:00
a1c36d6450 Minor cleanup as suggested by @ties 2024-03-01 09:30:33 +01:00
c3652d335c Merge pull request #115 from netixx/hash-slurm
[stayrtr] add hash check on slurm data
2024-02-29 20:21:26 +01:00
78a0c69abe Merge pull request #116 from cjeker/fix_count_in_processData
Don't count the wrong things
2024-02-29 16:05:35 +01:00
834eb645da [stayrtr] add hash check on slurm data
Hash was already performed on cache/vrp data
this performs it for slurm as well,
preventing uneeded refreshes when neither
file have changed.

Partial fix for https://github.com/bgp/stayrtr/issues/114.
2024-02-29 14:58:26 +01:00
277cd1e584 Return true or false from AddData().
Returns false and aborts the data addition if there is no change in the delta.
Use this to shortcut applyUpdateFromNewState() which prevents sending out
notifications for empty deltas.
2024-02-29 14:20:58 +01:00
48740ff8c7 Adjust processData() test after removing the count return value 2024-02-29 12:47:48 +01:00
ae6c463482 The count makes little sense as a return value. Especially since it does not include the vap and bgpsec keys.
As a result reloadFromCurrentState() gets utterly confused and creates new versions when there is no change.
Fix for #114
2024-02-29 11:51:23 +01:00
b773a90285 Merge pull request #113 from netixx/serial-metric
[stayrtr] add a metric for current serial number
2024-02-22 19:48:51 +01:00
bbf0f39107 [stayrtr] add a metric for current serial number 2024-02-22 17:53:35 +01:00
7bec069a27 Merge pull request #112 from bgp/nodelay-switch
Add switch to disable TCP_NODELAY
2024-02-09 11:41:45 +00:00
03532baaa4 Merge pull request #108 from cjeker/go_version
Require go 1.18 (it is enough for what is needed)
2023-12-21 16:34:31 +01:00
abcaca9947 Require go 1.18 (it is enough for what is needed) 2023-12-21 16:31:31 +01:00
2dfc26e226 Merge pull request #107 from cjeker/naming_is_hard
Naming is hard
2023-12-21 16:21:03 +01:00
c83f67289b Merge pull request #109 from cjeker/no_netipx
Remove netipx dependency
2023-12-21 16:20:25 +01:00
0c628f551c Remove the netipx module, it is no longer needed. 2023-12-21 16:08:28 +01:00
76b583e106 Use netip.Prefix.Overlaps() and a check on the prefixlen to see if
fPrefix covers rPrefix. This works since we only work with CIDR prefixes.
2023-12-21 16:05:25 +01:00
b91a5a53e5 Use basic functions from netip.Prefix to get the prefixlen and the
address length. No need to go around the block to get these values.
2023-12-21 15:51:15 +01:00
d7c85e3a24 Use netip.MustParsePrefix() instead of some ugly kludge 2023-12-21 15:45:52 +01:00
d1f8fb2b00 Another badly named function. CountVRPs does not return the number
of VRPs but the number of objects in the cache.
2023-12-21 14:22:09 +01:00
2f8e5b6d2b Kill manualserial, not used 2023-12-21 14:20:43 +01:00
2f252df7f9 More consistent naming, do not refer to the cache as just VRPs there
is more in it now.
2023-12-21 14:20:22 +01:00
a5294449cf Try to bring more consistency in naming things.
The toplevel JSON object is now RPKIList and it contains VRPJson, VAPJson
and BgpSecKeyJson objects.
2023-12-21 14:18:47 +01:00
477b3148c4 Don't use vrp for SendableData elements. Either use 'sd' or 'item'
depending if it is the array of SD or a single item.
2023-12-21 14:18:09 +01:00
4dc8601652 Merge pull request #105 from cjeker/kill_aspa_afi
Remove the AFI dependency for ASPA
2023-12-21 11:45:25 +01:00
e7fd4221b5 Refactor some code that has no need to be this complicated 2023-12-21 11:18:37 +01:00
d48fbc79f4 Remove the AFI dependency for ASPA
The AFI was removed from the ASPA profile so don't expect it anymore.
Now RTR is still using an old idea of ASPA profile so there just
duplicate the object once for IPv4 and once for IPv6. At some points
SIDROPS may finally fix this but for now this allows to export ASPA
objects that follow the rpki-client JSON (which no longer has the
AFI in the ASPA table).
2023-12-21 11:17:27 +01:00
3289b5d9b7 Merge pull request #103 from floatingstatic/structoptimize
Optimize VRP struct sizes. Use netip.Prefix instead of net.IPNet.
2023-12-21 09:21:41 +01:00
925a67227f Merge pull request #106 from cjeker/64bit_time_t
Use a int64 for Unix time to make this code 2038 proof.
2023-12-19 17:39:58 +01:00
b8a26d220b Use a int64 for Unix time to make this code 2038 proof. 2023-12-19 17:09:48 +01:00
8ded2cb68a RPKI is more than ROAs, rename the third-party source accordingly 2023-12-19 14:35:52 +00:00
236c4bf0dd Optimize VRP struct sizes. Use netip.Prefix instead of net.IPNet. 2023-12-18 10:50:26 -05:00
7fbe06c108 Merge pull request #104 from cjeker/mod_x_sys
Update x/sys dependency to a more current one to unbreak OpenBSD builds
2023-12-18 16:18:25 +01:00
8b71455ff0 Update x/sys dependency to a more current one to unbreak OpenBSD builds
In OpenBSD pledge used a direct syscall which is no longer supported and
so stayrtr terminates with
    pledge failed: function not implemented
2023-12-18 16:13:40 +01:00
5bd081b90b Add switch to disable TCP_NODELAY
This in an attempt quell CPU usage, since PCCW is having issues when
their {N} number of routers all start RTR sessions at the same time.

A `perf` of the system suggests all of the CPU is going to sending
TCP traffic, and since golang enables NO_DELAY (infamously?) by
default, this is a good smoking gun, since this would imply that
stayrtr is sending 1 TCP packet per RTR PDU, something that would
indeed cause a lot of CPU usage in aggergate!
2023-10-13 12:18:51 +01:00
58cac02340 Merge pull request #101 from ties/feature/track-rpki-objects-metric
Track multiple object types in rpki_objects metric
2023-05-14 20:12:47 +02:00
cc37823b9d Remove NumberOfBRKs 2023-05-09 18:00:45 +02:00
1f2ba2a371 Log the number of router keys/vaps on update 2023-05-03 08:37:00 +02:00
f545915dcc Add rpki_objects metric that tracks all object types 2023-05-03 08:18:15 +02:00
273ed80e3a highlight capabilities 2023-03-18 12:27:57 +00:00
54153e9b58 Merge pull request #94 from ties/go-versions
Build with stable and specified go version
2023-03-03 17:37:59 +01:00
1bfa1e6c6e Build with stable and specified go version 2023-03-03 15:10:07 +01:00
1740e861a3 Bump required go version to at least go 1.17
See discussion on https://github.com/bgp/stayrtr/pull/91
2023-03-02 20:18:28 +00:00
c112384f21 Tag v0.5.1 v0.5.1 2023-03-01 14:36:19 +00:00
5a3782245c Fix (false positive) test failure caused by the prev commit 2023-03-01 14:20:53 +00:00
62f5952776 Fix lock/slow sending due to a lock "moshpit"
Instead we now sort while processing, a much much safer place to
do it!
2023-03-01 14:15:18 +00:00