fix is_valid

production
186526 2023-02-26 18:07:04 +08:00
parent afebf9110b
commit 37e853aa4a
2 changed files with 8 additions and 5 deletions

View File

@ -96,15 +96,17 @@
| sg-sin1 | Singapore | 411 | Core | ✓ | | sg-sin1 | Singapore | 411 | Core | ✓ |
| sg-sin2 | Singapore | 412 | Edge | | sg-sin2 | Singapore | 412 | Edge |
| in-bom1 | Mumbai, IN | 421 | Edge | | in-bom1 | Mumbai, IN | 421 | Edge |
| China Mainland | | au-syd1 | Sydney, AU | 501 | Core | ✓ |
<!-- | China Mainland |
| cn-pek1 | Beijing, CN | 431 | Core | ✓ | | cn-pek1 | Beijing, CN | 431 | Core | ✓ |
| cn-pek2 | Beijing, CN | 431 | Edge | | cn-pek2 | Beijing, CN | 431 | Edge |
| cn-ctu1 | near Chengdu, China | 432 | Edge | ✓ | | cn-sjw1 | Shijiazhuang, CN | 431 | Edge | ✓ |
| cn-ctu1 | near Chengdu, CN | 432 | Edge | ✓ |
| cn-can1 | Guangzhou, CN | 433 | Core | | | cn-can1 | Guangzhou, CN | 433 | Core | |
| cn-wuh1 | Wuhan, CN | 434 | Core | ✓ | | cn-wuh1 | Wuhan, CN | 434 | Core | ✓ |
| cn-wuh2 | Wuhan, CN | 434 | Edge | ✓ | | cn-wuh2 | Wuhan, CN | 434 | Edge | ✓ |
| cn-csx1 | Changsha, CN | 435 | Edge | | cn-csx1 | Changsha, CN | 435 | Edge |
| cn-csx2 | Changsha, CN | 435 | Edge | | cn-csx2 | Changsha, CN | 435 | Edge |
| cn-cgo1 | Zhengzhou, CN | 437 | Edge | ✓ | | cn-cgo1 | Zhengzhou, CN | 437 | Edge | ✓ |
| cn-tao1 | Qingdao, CN | 438 | Edge | ✓ | | cn-tao1 | Qingdao, CN | 438 | Edge | ✓ | -->
| au-syd1 | Sydney, AU | 501 | Core | ✓ |

View File

@ -25,7 +25,8 @@ function is_downstream_asn() {
} }
function is_valid() { function is_valid() {
if (LOCAL_ASN, 0, 665) ~ bgp_large_community then return true; if (LOCAL_ASN, 110, 30) ~ bgp_large_community then return true;
if bgp_path.len = 0 then return true;
if pub_is_invalid_net_length() then return false; if pub_is_invalid_net_length() then return false;
if is_bogon_prefix() then return false; if is_bogon_prefix() then return false;
if is_bogon_asn() then return false; if is_bogon_asn() then return false;