From 24ae015b724559209d307a37236027f8a88583aa Mon Sep 17 00:00:00 2001
From: Fritz Grimpen <grimpen@uni-bremen.de>
Date: Tue, 7 Mar 2017 15:59:15 +0000
Subject: [PATCH] Allow address scopes for non-link-local addresses

There are legal reasons to use address scopes for non-link-local
addresses, for example when running BGP peerings in VRF. There is no
action for listening sockets required, as [1] states, while for
connecting sockets setting the SO_BINDTODEVICE sockopt is neccessary.

[1] https://www.kernel.org/doc/Documentation/networking/vrf.txt
---
 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 0f1c9446..093fb3dc 100644
--- a/proto/bgp/bgp.c
+++ b/proto/bgp/bgp.c
@@ -1327,8 +1327,8 @@ bgp_check_config(struct bgp_config *c)
   // if (ipa_is_link_local(c->remote_ip) && !c->iface)
   //   cf_error("Link-local neighbor address requires specified interface");
 
-  if (!ipa_is_link_local(c->remote_ip) != !c->iface)
-    cf_error("Link-local address and interface scope must be used together");
+  // if (!ipa_is_link_local(c->remote_ip) != !c->iface)
+  //   cf_error("Link-local address and interface scope must be used together");
 
   if (!(c->capabilities && c->enable_as4) && (c->remote_as > 0xFFFF))
     cf_error("Neighbor AS number out of range (AS4 not available)");
-- 
2.12.0

