mirror of
https://github.com/bgp/bgpq4
synced 2025-02-28 08:53:11 +00:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
95d3a4c12b | ||
|
|
2e06d3c389 | ||
|
|
3d2eed555d | ||
|
|
a28752247c | ||
|
|
26d631b257 | ||
|
|
841840be68 | ||
|
|
8ae08b79b1 |
1
.github/images/debian:trixie.Dockerfile
vendored
Symbolic link
1
.github/images/debian:trixie.Dockerfile
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
debian.Dockerfile
|
||||
10
.github/workflows/matrixbuild.yml
vendored
10
.github/workflows/matrixbuild.yml
vendored
@@ -9,23 +9,27 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
dockerenv:
|
||||
- debian:trixie
|
||||
- debian:bookworm
|
||||
- debian:bullseye
|
||||
- debian:buster
|
||||
- ubuntu:jammy
|
||||
- ubuntu:focal
|
||||
- ubuntu:bionic
|
||||
- fedora/fedora:40
|
||||
- fedora/fedora:39
|
||||
- fedora/fedora:38
|
||||
- fedora/fedora:37
|
||||
- fedora/fedora:36
|
||||
- centos/centos:stream9
|
||||
- centos/centos:stream8
|
||||
- centos/centos:7
|
||||
- rockylinux/rockylinux:9
|
||||
- rockylinux/rockylinux:8
|
||||
- alpine:edge
|
||||
- alpine:3.17
|
||||
- alpine:3.19
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Work around Docker BuildKit regression
|
||||
# https://github.com/moby/buildkit/issues/2119: `DOCKER_BUILDKIT=1 docker build` fails if Dockerfile is a symlink
|
||||
run: cp --remove-destination $(readlink -f .github/images/${{matrix.dockerenv}}.Dockerfile) .github/images/${{matrix.dockerenv}}.Dockerfile
|
||||
- name: Run build on ${{matrix.dockerenv}}
|
||||
run: docker build . --file .github/images/${{matrix.dockerenv}}.Dockerfile --build-arg image=${{matrix.dockerenv}}
|
||||
|
||||
10
CHANGES
10
CHANGES
@@ -1,3 +1,13 @@
|
||||
1.12 (2024-02-12)
|
||||
- Fix a bug in the mikrotik printer
|
||||
|
||||
1.11 (2023-06-20)
|
||||
- disallow AS 23456 as origin (can be bypassed via -p)
|
||||
|
||||
1.10 (2023-06-03)
|
||||
- Add support for Nokia SR Linux IP prefix lists / ACL filters
|
||||
- Accept -3 as a no-op for bgpq3 compatibility
|
||||
|
||||
1.9 (2023-03-05)
|
||||
- Bugfix for -S problem (bgpq4#83) by James Bensley
|
||||
|
||||
|
||||
@@ -128,6 +128,10 @@ It's options are as follows:
|
||||
|
||||
> generate config for Nokia SR OS MD-CLI (Cisco IOS by default)
|
||||
|
||||
**-n2**
|
||||
|
||||
> generate config for Nokia SR Linux (Cisco IOS by default)
|
||||
|
||||
**-N**
|
||||
|
||||
> generate config for Nokia SR OS classic CLI (Cisco IOS by default).
|
||||
|
||||
3
bgpq4.8
3
bgpq4.8
@@ -114,7 +114,8 @@ generate config for Nokia SR Linux (Cisco IOS by default)
|
||||
.It Fl N
|
||||
generate config for Nokia SR OS classic CLI (Cisco IOS by default).
|
||||
.It Fl p
|
||||
emit prefixes where the origin ASN is in the private ASN range (disabled by default).
|
||||
emit prefixes where the origin ASN is 23456 or in the private ASN range
|
||||
(disabled by default).
|
||||
.It Fl r Ar len
|
||||
allow more specific routes starting with specified masklen too.
|
||||
.It Fl R Ar len
|
||||
|
||||
10
expander.c
10
expander.c
@@ -183,7 +183,7 @@ int
|
||||
bgpq_expander_add_as(struct bgpq_expander *b, char *as)
|
||||
{
|
||||
char *eoa;
|
||||
uint32_t asno = 0;
|
||||
uint32_t asno = 0;
|
||||
struct asn_entry *asne;
|
||||
|
||||
if (!b || !as)
|
||||
@@ -191,14 +191,14 @@ bgpq_expander_add_as(struct bgpq_expander *b, char *as)
|
||||
|
||||
asno = strtoul(as + 2, &eoa, 10);
|
||||
if (eoa && *eoa != 0) {
|
||||
sx_report(SX_ERROR,"Invalid symbol in AS number: '%c' in %s\n",
|
||||
sx_report(SX_ERROR, "Invalid symbol in AS number: '%c' in %s\n",
|
||||
*eoa, as);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!expand_special_asn &&
|
||||
(asno >= 4200000000ul || (asno >= 64496 && asno <= 65551))) {
|
||||
sx_report(SX_ERROR,"Invalid AS number: %u\n", asno);
|
||||
if (!expand_special_asn && (asno == 23456 || asno >= 4200000000ul
|
||||
|| (asno >= 64496 && asno <= 65551))) {
|
||||
sx_report(SX_ERROR, "Invalid AS number: %u\n", asno);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
1
main.c
1
main.c
@@ -94,6 +94,7 @@ usage(int ecode)
|
||||
printf(" -M match : extra match conditions for JunOS route-filters\n");
|
||||
printf(" -l name : use specified name for generated access/prefix/.."
|
||||
" list\n");
|
||||
printf(" -p : allow special ASNs like 23456 or in the private range");
|
||||
printf(" -R len : allow more specific routes up to specified masklen\n");
|
||||
printf(" -r len : allow more specific routes from masklen specified\n");
|
||||
printf(" -s : generate sequence numbers in prefix-lists (IOS only)\n");
|
||||
|
||||
@@ -1870,7 +1870,7 @@ bgpq4_print_k7prefix(struct sx_radix_node *n, void *ff)
|
||||
prefix, n->aggregateLow, n->aggregateHi);
|
||||
else
|
||||
fprintf(f,"/routing filter rule add chain=\""
|
||||
"%s-%s\" rule=\"if (dst=%s) {accept}\"\n",
|
||||
"%s-%s\" rule=\"if (dst==%s) {accept}\"\n",
|
||||
bname ? bname : "NN",
|
||||
n->prefix->family == AF_INET ? "V4" : "V6",
|
||||
prefix);
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
/routing filter rule add chain="NN-V4" rule="if (dst=192.31.196.0/24) {accept}"
|
||||
/routing filter rule add chain="NN-V4" rule="if (dst=192.175.48.0/24) {accept}"
|
||||
/routing filter rule add chain="NN-V4" rule="if (dst==192.31.196.0/24) {accept}"
|
||||
/routing filter rule add chain="NN-V4" rule="if (dst==192.175.48.0/24) {accept}"
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
/routing filter rule add chain="NN-V6" rule="if (dst=2001:4:112::/48) {accept}"
|
||||
/routing filter rule add chain="NN-V6" rule="if (dst=2620:4f:8000::/48) {accept}"
|
||||
/routing filter rule add chain="NN-V6" rule="if (dst==2001:4:112::/48) {accept}"
|
||||
/routing filter rule add chain="NN-V6" rule="if (dst==2620:4f:8000::/48) {accept}"
|
||||
|
||||
Reference in New Issue
Block a user