mirror of
https://github.com/bgp/bgpq4
synced 2025-02-28 08:53:11 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d14a7c43d3 |
4
.github/images/centos.Dockerfile
vendored
4
.github/images/centos.Dockerfile
vendored
@@ -2,8 +2,8 @@ ARG image=centos/centos:latest
|
||||
FROM quay.io/$image
|
||||
|
||||
# Install dependencies
|
||||
RUN dnf -y update
|
||||
RUN dnf -y install autoconf automake gcc libtool make diffutils file gzip
|
||||
RUN yum update -y
|
||||
RUN yum install -y autoconf automake gcc libtool make diffutils file gzip
|
||||
|
||||
# Add source code
|
||||
ADD . /src
|
||||
|
||||
1
.github/images/fedora/fedora:38.Dockerfile
vendored
Symbolic link
1
.github/images/fedora/fedora:38.Dockerfile
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
../centos.Dockerfile
|
||||
1
.github/images/fedora/fedora:39.Dockerfile
vendored
Symbolic link
1
.github/images/fedora/fedora:39.Dockerfile
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
../centos.Dockerfile
|
||||
17
.github/images/fedora/fedora:42.Dockerfile
vendored
17
.github/images/fedora/fedora:42.Dockerfile
vendored
@@ -1,17 +0,0 @@
|
||||
ARG image=centos/centos:latest
|
||||
FROM quay.io/$image
|
||||
|
||||
# Install dependencies
|
||||
RUN dnf -y update
|
||||
RUN dnf -y install autoconf automake gcc libtool make diffutils file gzip awk
|
||||
|
||||
# Add source code
|
||||
ADD . /src
|
||||
WORKDIR /src
|
||||
|
||||
# Run steps
|
||||
RUN ./bootstrap
|
||||
RUN ./configure
|
||||
RUN make
|
||||
RUN make check
|
||||
RUN make distcheck
|
||||
1
.github/images/ubuntu:bionic.Dockerfile
vendored
Symbolic link
1
.github/images/ubuntu:bionic.Dockerfile
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
debian.Dockerfile
|
||||
7
.github/workflows/build-container.yml
vendored
7
.github/workflows/build-container.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
||||
|
||||
build:
|
||||
name: Build container
|
||||
runs-on: ubuntu-24.04
|
||||
runs-on: ubuntu-22.04
|
||||
needs: test
|
||||
|
||||
steps:
|
||||
@@ -48,7 +48,6 @@ jobs:
|
||||
type=sha
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
if: github.repository_owner == 'bgp'
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
@@ -56,10 +55,10 @@ jobs:
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v6
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
file: .github/images/alpine:3.Dockerfile
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: ${{ github.repository_owner == 'bgp' }}
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
|
||||
14
.github/workflows/matrixbuild.yml
vendored
14
.github/workflows/matrixbuild.yml
vendored
@@ -12,22 +12,24 @@ jobs:
|
||||
- debian:trixie
|
||||
- debian:bookworm
|
||||
- debian:bullseye
|
||||
- ubuntu:noble
|
||||
- debian:buster
|
||||
- ubuntu:jammy
|
||||
- ubuntu:focal
|
||||
- fedora/fedora:42
|
||||
- fedora/fedora:41
|
||||
- ubuntu:bionic
|
||||
- fedora/fedora:40
|
||||
- centos/centos:stream10
|
||||
- fedora/fedora:39
|
||||
- fedora/fedora:38
|
||||
- centos/centos:stream9
|
||||
- centos/centos:stream8
|
||||
- centos/centos:7
|
||||
- rockylinux/rockylinux:9
|
||||
- rockylinux/rockylinux:8
|
||||
- alpine:edge
|
||||
- alpine:3.21
|
||||
- alpine:3.19
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- 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: [ -L .github/images/${{matrix.dockerenv}}.Dockerfile ] && cp --remove-destination $(readlink -f .github/images/${{matrix.dockerenv}}.Dockerfile) .github/images/${{matrix.dockerenv}}.Dockerfile
|
||||
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}}
|
||||
|
||||
5
.github/workflows/unit-tests.yml
vendored
5
.github/workflows/unit-tests.yml
vendored
@@ -8,15 +8,12 @@ on:
|
||||
- reopened
|
||||
- ready_for_review
|
||||
- synchronize
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
workflow_call:
|
||||
|
||||
jobs:
|
||||
output-unit-tests:
|
||||
name: output unit tests
|
||||
runs-on: ubuntu-24.04
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: clone repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
6
CHANGES
6
CHANGES
@@ -1,9 +1,3 @@
|
||||
1.15 (2024-05-15)
|
||||
- Apologies, debug code slipped into the last release
|
||||
|
||||
1.14 (2024-05-14)
|
||||
- Small performance gain: set TCP_NODELAY on the socket
|
||||
|
||||
1.13 (2024-05-01)
|
||||
- Fixed a bug for Mac users by removing sx_maxsockbuf()
|
||||
- Fixed a comma printing bug in IOS XR as-path-set output
|
||||
|
||||
@@ -36,8 +36,4 @@ maintainer-clean-local:
|
||||
check:
|
||||
./bgpq4 -v
|
||||
@echo
|
||||
-if [ -s /etc/resolv.conf ]; then \
|
||||
./bgpq4 -ddd -6 AS15562:AS-SNIJDERS ; \
|
||||
else \
|
||||
echo "No or empty /etc/resolv.conf, skipping online test"; \
|
||||
fi
|
||||
./bgpq4 -6 AS15562:AS-SNIJDERS | grep 2001:67c:208c::
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/select.h>
|
||||
#include <netinet/tcp.h>
|
||||
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
@@ -1035,7 +1034,7 @@ bgpq_expand(struct bgpq_expander *b)
|
||||
struct addrinfo hints, *res = NULL, *rp;
|
||||
struct linger sl;
|
||||
struct asn_entry *asne;
|
||||
int fd = -1, err, ret, aquery = 0, nodelay = 1;
|
||||
int fd = -1, err, ret, aquery = 0;
|
||||
int slen;
|
||||
|
||||
sl.l_onoff = 1;
|
||||
@@ -1076,11 +1075,6 @@ bgpq_expand(struct bgpq_expander *b)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &nodelay,
|
||||
sizeof(nodelay)) == -1)
|
||||
SX_DEBUG(debug_expander, "Unable to set TCP_NODELAY on"
|
||||
" socket: %s\n", strerror(errno));
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
8
main.c
8
main.c
@@ -604,14 +604,6 @@ main(int argc, char* argv[])
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (expander.vendor == V_ARISTA
|
||||
&& expander.generation == T_EACL
|
||||
&& expander.family == AF_INET6) {
|
||||
sx_report(SX_FATAL, "Sorry, extended access-lists is not compatible "
|
||||
"with Arista EOS and IPv6\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (expander.sequence
|
||||
&& (expander.vendor != V_CISCO && expander.vendor != V_ARISTA)) {
|
||||
sx_report(SX_FATAL, "Sorry, prefix-lists sequencing (-s) supported"
|
||||
|
||||
15
printer.c
15
printer.c
@@ -300,14 +300,11 @@ bgpq4_print_juniper_aslist(FILE *f, struct bgpq_expander *b)
|
||||
|
||||
RB_FOREACH(asne, asn_tree, &b->asnlist) {
|
||||
if (!nc) {
|
||||
fprintf(f, " as-list a%u members [",
|
||||
lineNo);
|
||||
}
|
||||
|
||||
// Filter out AS 0
|
||||
// "error: RPD Policy: Invalid AS 0"
|
||||
if (asne->asn != 0)
|
||||
fprintf(f, " as-list a%u members [ %u",
|
||||
lineNo, asne->asn);
|
||||
} else {
|
||||
fprintf(f," %u", asne->asn);
|
||||
}
|
||||
|
||||
nc++;
|
||||
|
||||
@@ -1165,7 +1162,7 @@ bgpq4_print_eprefix(struct sx_radix_node *n, void *ff)
|
||||
|
||||
sx_prefix_snprintf(n->prefix, prefix, sizeof(prefix));
|
||||
|
||||
snprintf(seqno, sizeof(seqno), "seq %i", seq++);
|
||||
snprintf(seqno, sizeof(seqno), " seq %i", seq++);
|
||||
|
||||
if (n->isAggregate) {
|
||||
if (n->aggregateLow > n->prefix->masklen) {
|
||||
@@ -1868,7 +1865,7 @@ bgpq4_print_k7prefix(struct sx_radix_node *n, void *ff)
|
||||
|
||||
if (n->isAggregate)
|
||||
fprintf(f,"/routing filter rule add chain=\""
|
||||
"%s-%s\" rule=\"if (dst in %s && dst-len in %d-%d) {accept}\"\n",
|
||||
"%s-%s\" rule=\"if (dst in %s && dst-len in %d-%d) {accept}\"\n",
|
||||
bname ? bname : "NN",
|
||||
n->prefix->family == AF_INET ? "V4" : "V6",
|
||||
prefix, n->aggregateLow, n->aggregateHi);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
no ip prefix-list NN
|
||||
ip prefix-list NN
|
||||
seq 1 permit 192.31.196.0/24
|
||||
seq 2 permit 192.175.48.0/24
|
||||
seq 1 permit 192.31.196.0/24
|
||||
seq 2 permit 192.175.48.0/24
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
no ipv6 prefix-list NN
|
||||
ipv6 prefix-list NN
|
||||
seq 1 permit 2001:4:112::/48
|
||||
seq 2 permit 2620:4f:8000::/48
|
||||
seq 1 permit 2001:4:112::/48
|
||||
seq 2 permit 2620:4f:8000::/48
|
||||
|
||||
Reference in New Issue
Block a user