From 188bb55b4856dc9115aeee244b779314f56ba204 Mon Sep 17 00:00:00 2001 From: Mingwei Zhang Date: Thu, 18 Jul 2024 15:43:10 -0700 Subject: [PATCH] fix a bug where OR is used instead of AND --- src/asinfo/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/asinfo/mod.rs b/src/asinfo/mod.rs index 3b46faa..724ed56 100644 --- a/src/asinfo/mod.rs +++ b/src/asinfo/mod.rs @@ -221,7 +221,7 @@ impl BgpkitCommons { let info_1_opt = self.asinfo_get(asn1)?; let info_2_opt = self.asinfo_get(asn2)?; - if info_1_opt.is_some() || info_2_opt.is_some() { + if info_1_opt.is_some() && info_2_opt.is_some() { let org_1_opt = info_1_opt.unwrap().as2org; let org_2_opt = info_2_opt.unwrap().as2org; if org_1_opt.is_some() || org_2_opt.is_some() {