Diff for scripts/shell/firewall/firewall.d/subnets/simplify-subnets.sh between version 1.4 and 1.5
| version 1.4, 2018/05/08 00:00:30 |
version 1.5, 2018/05/08 00:20:40 |
|
|
| # 2018-05-07 - created |
# 2018-05-07 - created |
| # |
# |
| |
|
| # $Platon: scripts/shell/firewall/firewall.d/subnets/simplify-subnets.sh,v 1.3 2018/05/07 23:52:34 nepto Exp $ |
# $Platon: scripts/shell/firewall/firewall.d/subnets/simplify-subnets.sh,v 1.4 2018/05/08 00:00:30 nepto Exp $ |
| |
|
| # Minimum amount of C-classes to be merged into one B-class |
# Minimum amount of C-classes to be merged into one B-class |
| MIN_C_CLASS_MERGE=120; |
MIN_C_CLASS_MERGE=120; |
| Line 53 while IFS='' read -r line; do |
|
| Line 53 while IFS='' read -r line; do |
|
| |
|
| if [ "$subnet_B" = "$prev_B" ]; then |
if [ "$subnet_B" = "$prev_B" ]; then |
| to_write="$to_write"$'\n'; |
to_write="$to_write"$'\n'; |
| to_write="$to_write$subnet_C/24"; |
to_write="$to_write$subnet_C/$mask"; |
| prev_C="$subnet_C"; |
prev_C="$subnet_C"; |
| cnt_CinB=$(( cnt_CinB + 1 )); |
cnt_CinB=$(( cnt_CinB + 1 )); |
| continue; |
continue; |
Platon Group <platon@platon.org> http://platon.org/
|
|