stubnet
This commit is contained in:
parent
38e062aff8
commit
ab75f7f7e3
1 changed files with 6 additions and 2 deletions
8
setup.sh
8
setup.sh
|
@ -78,7 +78,6 @@ protocol static {
|
||||||
EOF
|
EOF
|
||||||
if [ -n "$ospf" ]; then
|
if [ -n "$ospf" ]; then
|
||||||
interfacelist=$(
|
interfacelist=$(
|
||||||
echo " area 0 {"
|
|
||||||
echo " interface \"lo\" { stub; };"
|
echo " interface \"lo\" { stub; };"
|
||||||
getval interface | while read -r inter; do
|
getval interface | while read -r inter; do
|
||||||
val="$(getval "interface $inter" OSPF)"
|
val="$(getval "interface $inter" OSPF)"
|
||||||
|
@ -91,7 +90,6 @@ EOF
|
||||||
echo " };"
|
echo " };"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
echo " };"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
|
@ -100,14 +98,20 @@ protocol ospf v3 ospf4 {
|
||||||
import all;
|
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; };
|
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
|
$interfacelist
|
||||||
|
};
|
||||||
}
|
}
|
||||||
protocol ospf v3 ospf6 {
|
protocol ospf v3 ospf6 {
|
||||||
ipv6 {
|
ipv6 {
|
||||||
import all;
|
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; };
|
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
|
$interfacelist
|
||||||
|
};
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue