Commit Graph

26 Commits

Author SHA1 Message Date
Job Snijders
b21c8b30ca remove unused includes 2021-08-17 22:23:33 +00:00
Job Snijders
270e04dd23 The string returned by inet_ntoa() resides in a static memory area 2021-08-17 22:20:16 +00:00
Job Snijders
32a3520e62 Fix -Wstrict-aliasing messages
Moving from uint32 -> struct in_addr
2021-08-17 22:16:56 +00:00
Job Snijders
b816c1023b Fix more warnings 2021-08-17 20:19:17 +00:00
Job Snijders
791f3d7790 Fixing style and compiler warnings 2021-08-17 18:03:03 +00:00
Job Snijders
6a4207f940 rename headerfile 2021-08-17 17:26:10 +00:00
Job Snijders
82b44b1304 Add license to each individual file 2021-08-17 12:11:05 +00:00
Job Snijders
0b554d4aa1 KNF 2021-08-17 10:12:40 +00:00
Job Snijders
406b984aa4 KNF 2021-08-12 08:25:36 +00:00
Stefan Marti
c2223849fc Huawei aspath bugfix (#44)
* bugfix huawei input as-path

* bgpq4_print_huawei_oaspath bug fix
2021-07-13 11:10:22 +00:00
Tony Lee
56432d3c74 Update bgpq4_printer.c (#43)
Correction Juniper route filter list ouput.
2021-07-03 18:41:45 +02:00
Brooks Swinnerton
d000627465 Arista EOS Support (#35)
Add Arista EOS support

Thanks Brooks!

This adds support for Arista EOS using a new flag: -e. EOS shares a lot of similarities with IOS,
but there is a difference in the syntax of prefix-lists that I wanted to fix.

The difference can be seen with bgpq4 -S ARIN -4 -s AS36459, which returns:

no ip prefix-list NN
ip prefix-list NN seq 1 permit 192.30.252.0/22
ip prefix-list NN seq 2 permit 192.30.252.0/23
ip prefix-list NN seq 3 permit 192.30.252.0/24
ip prefix-list NN seq 4 permit 192.30.253.0/24
ip prefix-list NN seq 5 permit 192.30.254.0/24
ip prefix-list NN seq 6 permit 192.30.255.0/24

Interestingly, this syntax works fine in EOS, but EOS isn't able to handle the same syntax for ipv6
prefix-lists. Instead, the seq and permit/deny that compose the rule needs to be inside the prefix-list
block.

Now bgpq4 -S ARIN -4 -e AS36459 generates:

no ip prefix-list NN
ip prefix-list NN
    seq 1 permit 192.30.252.0/22
    seq 2 permit 192.30.252.0/23
    seq 3 permit 192.30.252.0/24
    seq 4 permit 192.30.253.0/24
    seq 5 permit 192.30.254.0/24
    seq 6 permit 192.30.255.0/24
2020-12-23 15:07:23 +00:00
Brooks Swinnerton
12da3fc231 Respect -s when there are no prefix lists
This commit fixes a bug with when there are no prefix list results but
the `-s` argument is passed.
2020-12-20 17:47:40 -05:00
Chris Caputo
92d52b9133 Fix totally broken final newline code with '-F'. 2020-03-11 16:22:46 +00:00
Chris Caputo
1d5b375cc3 Enable aggregate support with '-F' (user-defined). 2020-03-11 16:22:46 +00:00
Chris Caputo
e4d72f0505 Fix user-defined format stack-smash ability.
'-F' option: Avoids risk of stack-smashing which was ever so present,
by just fprintf'ing directly to output stream.
2020-03-11 16:22:46 +00:00
Job Snijders
de3c94ac9d Unbreak -G
(And some formatting changes)

Thanks for reporting sthen@openbsd.org!
2020-01-01 17:49:28 +01:00
Job Snijders
bc16d6fb45 Merge branch 'master' of github.com:bgp/bgpq4 2019-12-31 00:02:31 +00:00
Job Snijders
10cdd5656d Remove the option to disable 32-bit ASN support
This removes the '-3' command line option and fixes #3.
2019-12-30 23:58:47 +00:00
Gerdriaan Mulder
4a2fe3d966 Remove superfluous semi-colon after closing brace 2019-12-30 20:55:38 +01:00
Job Snijders
7d6c4421de Apply OpenBSD's style(9) code formatting 2019-12-30 18:00:53 +00:00
Job Snijders
a931b9d12b Resolve merge conflict 2019-12-22 17:15:05 +01:00
Peter Schoenmaker
03e3b11d95 Fix memory leaks 2019-12-22 16:05:05 +01:00
Job Snijders
2e427a0f47 Remove ASDOT support 2019-12-14 15:12:10 +01:00
Christian David
87966dc1f0 Add support for Mikrotik 2019-12-14 15:11:46 +01:00
Job Snijders
26f49e46a5 Rename bgpq3 to bgpq4 2019-12-14 14:41:14 +01:00