32 Commits

Author SHA1 Message Date
Job Snijders 116f159b06 Improve error message 2026-03-15 16:31:30 +00:00
Robert Scheck 0f1f5942ec Remove duplicate/unreachable if() (#128) 2026-03-15 16:30:29 +00:00
Gerdriaan Mulder 50ca9f573b expander.c: logic fix in bgpq_expander_invalidate_asn() (#132)
In 6c8c6cfec1 the semantics of this function
changed. Previously, it returned early when it couldn't find the ASN, otherwise
removed it. After that commit, it would only try to remove non-existing entries.

@ytti expected `bgpq4 -wG 42 AS-DSS-ALL` to exclude AS400805 from the output as
it does not contain any prefixes.
2026-03-15 16:10:07 +00:00
Jay Ford 6e89caec6e Update expander.c to remove errant "Checking" output (#131)
The errant "Checking" output (only when pipelining is enabled, by the way) results in bogus JSON output.
2026-01-09 23:01:17 +00:00
Job Snijders 424770be0b Set TCP_NODELAY on the socket
Nagle's algorithm probably serves no purpose with whois queries
often being tiny.
2024-05-10 09:41:28 +00:00
Job Snijders f44bf47b1f Don't try to maximize the send buffer
Get rid of code that did a binary search to maximize the send buffer
via setsockopt SO_SNDBUF. It caused problems for modern Mac users.
2024-05-01 12:00:17 +00:00
Job Snijders a89ac75590 experiment 1 2024-05-01 11:45:59 +00:00
Job Snijders 59f800f31f Do not fiddle with the socket buffer size 2024-05-01 11:20:41 +00:00
Job Snijders 26d631b257 By default disallow 23456 as origin
Can be bypassed with '-p'
2023-06-20 12:18:41 +00:00
James Bensley 31ce2e452f Fix issue bgp#83 - fix regression bug which ignored -S CLI option (#1) (#85)
* Fix issue bgp#83 - fix regression bug which ignored -S CLI option (#1)

* Fix issue #83 - fix regression bug which ignored -S CLI option, introduced by commit 08b81f7d19
---------

Co-authored-by: James Bensley <jwbensley@gmail.com>

* Fix off-by-one error

* Swap strlcpy for strdup

---------

Co-authored-by: James Bensley <jwbensley@gmail.com>
2023-03-05 12:08:11 +00:00
Job Snijders 6fdae48462 It was argued that upgrading the 'key not found' from DEBUG to ERROR was too verbose 2023-01-20 15:50:25 +00:00
Job Snijders 0deb7f224c Switch strcpy to strlcpy 2023-01-09 21:08:08 +00:00
Job Snijders 975b577b2e Restore -p functionality 2023-01-09 21:05:39 +00:00
Job Snijders b785c02e37 KNF 2022-11-07 13:53:01 +00:00
Robert Scheck 233380d4e9 Remove option to accept routes registered for private ASNs (#77) 2022-11-05 00:40:38 +01:00
James Bensley 08b81f7d19 Parse 'SOURCE::' to only use a specific source for an AS-SET or Route Set
This extension allows operators to specify what IRR source to use when expanding an AS-SET.

For example: `bgpq4 RIPE::AS15562:AS-SNIJDERS`

The notation is also used in databases like PeeringDB.

Authored-by: James Bensley <jwbensley@gmail.com>
2022-11-03 10:09:29 +00:00
Job Snijders 5507267c63 Fix prefix address range parsing
This solves #65
2022-09-07 12:48:06 +00:00
Job Snijders 6c8c6cfec1 Reduce memory usage 2021-08-20 01:58:38 +00:00
Job Snijders b481111cf6 Replace ASN storage facility with Red Black tree macros (RB_) 2021-08-20 00:50:56 +00:00
Job Snijders 80b7dcf4de KNF & renaming 2021-08-19 20:21:25 +00:00
Job Snijders 5ce7d7bfea Untangle function and KNF 2021-08-19 19:59:21 +00:00
Job Snijders da750ed48f KNF 2021-08-19 15:39:19 +00:00
Job Snijders 2391fdb317 Typo 2021-08-19 14:06:01 +00:00
Job Snijders 9f8d82db21 Ensure all queries end with a newline 2021-08-19 13:19:05 +00:00
Job Snijders bf5f10def9 Rework where newlines are inserted 2021-08-18 16:56:13 +00:00
Job Snijders 1f7572c2f1 KNF 2021-08-18 12:28:57 +00:00
Job Snijders 9ac2087d24 KNF 2021-08-18 01:16:29 +00:00
Job Snijders 40656fbbbf Clean up comments 2021-08-18 00:40:02 +00:00
Job Snijders 4a8dc682fd Add more free() to counter memory errors 2021-08-18 00:38:44 +00:00
Job Snijders 450286a010 plug memory leaks 2021-08-18 00:18:26 +00:00
Job Snijders a055f6f2ee Adding a free(), KNF 2021-08-17 23:51:18 +00:00
Job Snijders c4c5866fa3 Fold freeall functions into expander.c 2021-08-17 23:03:29 +00:00