Add ASPA filter syntax validation

This commit is contained in:
Quantum 2024-10-30 02:15:54 -04:00
parent abc11fb0ce
commit f8d8ba844f
2 changed files with 52 additions and 0 deletions

View file

@ -16,3 +16,8 @@ jobs:
sudo apt-get install -y bird2
- name: Test skeleton.conf syntax
run: /usr/sbin/bird -c skeleton.conf -p
- name: Generate aspa_invalids.conf
run: ./make-bird-aspa aspa/example.json > aspa_invalids.conf
- name: Test skeleton-aspa.conf syntax
run: /usr/sbin/bird -c skeleton-aspa.conf -p

47
skeleton-aspa.conf Normal file
View file

@ -0,0 +1,47 @@
log syslog all;
# FIXME: Change this to one of your router's IPv4 addresses.
# If you have none, pick something random from 240.0.0.0/4.
router id 192.0.2.1;
protocol kernel {
scan time 60;
ipv4 {
export where source != RTS_STATIC;
# NOTE: this basic export above doesn't make the routes inserted into
# the kernel prefer your own IPs. Things will work fine with your
# server's IP assigned by the provider if you have a single upstream
# but strange things will happen if you have more than one peer.
# Instead, to use your own IP as the default source IP for outgoing
# connections on your system, add an IP from your range to the `lo`
# interface, remove the line above, and use the block below, changing
# 192.0.2.1 to the IP used.
#
# export filter {
# if source = RTS_STATIC then reject;
# if source = RTS_BGP then krt_prefsrc = 192.0.2.1;
# accept;
# };
};
}
protocol kernel {
scan time 60;
ipv6 {
export where source != RTS_STATIC;
# NOTE: similar to above, use the following block to change the default
# source IP for outgoing connections.
# export filter {
# if source = RTS_STATIC then reject;
# if source = RTS_BGP then krt_prefsrc = 2001:db8::1;
# accept;
# };
};
}
protocol device {
scan time 60;
}
include "aspa_invalids.conf";
include "filter_aspa.conf";