From da024a16c1522038f354be29a64f0cd9c0ba5bf4 Mon Sep 17 00:00:00 2001
From: Sebastian Hahn <sebastian@torproject.org>
Date: Mon, 11 Mar 2024 06:00:09 +0100
Subject: [PATCH] Allow bgp strict bind with only an interface set

---
 proto/bgp/bgp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/proto/bgp/bgp.c b/proto/bgp/bgp.c
index bd6e90d6..2dd55f2a 100644
--- a/proto/bgp/bgp.c
+++ b/proto/bgp/bgp.c
@@ -2002,8 +2002,8 @@ bgp_postconfig(struct proto_config *CF)
   if (ipa_zero(cf->remote_ip) && !cf->remote_range)
     cf_error("Neighbor must be configured");
 
-  if (ipa_zero(cf->local_ip) && cf->strict_bind)
-    cf_error("Local address must be configured for strict bind");
+  if (!cf->iface && ipa_zero(cf->local_ip) && cf->strict_bind)
+    cf_error("Local address or interface must be configured for strict bind");
 
   if (!cf->remote_as && !cf->peer_type)
     cf_error("Remote AS number (or peer type) must be set");
-- 
2.44.0

