mirror of
https://github.com/quantum5/bird-filter.git
synced 2025-04-24 00:51:57 -04:00
Add ASPA filter syntax validation
This commit is contained in:
parent
abc11fb0ce
commit
f8d8ba844f
5
.github/workflows/bird.yml
vendored
5
.github/workflows/bird.yml
vendored
|
@ -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
47
skeleton-aspa.conf
Normal 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";
|
Loading…
Reference in a new issue