Hi.

Here is a small patch which allows non-zero address scopes on
non-link-local addresses. This is required to create connections inside
a VRF domain, as the Linux kernel documentation states.

In combination with multiple RIBs and FIBs, this makes Bird completely
VRF-capable. Therefore, this patch is neccessary to integrate Bird in
non-trivial routing setups without the use of multiple network namespaces.

It would be nice when you accept this patch.


Kind regards,

Fritz Grimpen
From 24ae015b724559209d307a37236027f8a88583aa Mon Sep 17 00:00:00 2001
From: Fritz Grimpen <grim...@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

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to