diff options
author | Freya Murphy <freya@freyacat.org> | 2023-12-12 18:25:26 -0500 |
---|---|---|
committer | Freya Murphy <freya@freyacat.org> | 2023-12-12 18:25:26 -0500 |
commit | ab75f7f7e3586a9fbcb34f4d333c1264210fd3ac (patch) | |
tree | 589d84726a5d688d683a31bd5faf56d57f70542e | |
parent | tabs (diff) | |
download | freyanet-ab75f7f7e3586a9fbcb34f4d333c1264210fd3ac.tar.gz freyanet-ab75f7f7e3586a9fbcb34f4d333c1264210fd3ac.tar.bz2 freyanet-ab75f7f7e3586a9fbcb34f4d333c1264210fd3ac.zip |
stubnet
-rwxr-xr-x | setup.sh | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -78,7 +78,6 @@ protocol static { EOF if [ -n "$ospf" ]; then interfacelist=$( - echo " area 0 {" echo " interface \"lo\" { stub; };" getval interface | while read -r inter; do val="$(getval "interface $inter" OSPF)" @@ -91,7 +90,6 @@ EOF echo " };" fi done - echo " };" ) cat <<EOF @@ -100,14 +98,20 @@ protocol ospf v3 ospf4 { import all; export filter { if source ~ [RTS_DEVICE, RTS_INHERIT] && net ~ [$(getval "Subnet" | grep -v ':' | while read -r line; do printf "%s+," "$line"; done | sed 's/,$//')] then accept; else reject; }; }; + area 0 { +$(getval "Stubnet" | grep -v ':' | while read -r net; do echo " stubnet $net {};"; done) $interfacelist + }; } protocol ospf v3 ospf6 { ipv6 { import all; export filter { if source ~ [RTS_DEVICE, RTS_INHERIT] && net ~ [$(getval "Subnet" | grep ':' | while read -r line; do printf "%s+," "$line"; done | sed 's/,$//')] then accept; else reject; }; }; + area 0 { +$(getval "Stubnet" | grep ':' | while read -r net; do echo " stubnet $net {};"; done) $interfacelist + }; } EOF fi |