summaryrefslogtreecommitdiffstats
path: root/zebra/connected.c
diff options
context:
space:
mode:
authorvivek <vivek@cumulusnetworks.com>2016-04-16 04:19:37 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2016-09-23 15:30:56 +0200
commit40c7bdb0c9ba746d1f1bdfe1cb4d03aa5f407661 (patch)
treedeeff1f385d86818d5f85258074960cdd2827508 /zebra/connected.c
parentQuagga: Fix alignment in netlink messages in some cases (diff)
downloadfrr-40c7bdb0c9ba746d1f1bdfe1cb4d03aa5f407661.tar.xz
frr-40c7bdb0c9ba746d1f1bdfe1cb4d03aa5f407661.zip
Quagga: Install label forwarding entries for statically configured LSPs
Install the statically configured LSPs into the FIB (kernel). This is done using the new attributes and definitions for MPLS in the kernel - RTA_VIA, RTA_NEWDST and AF_MPLS. Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com> Ticket: CM-4804 Reviewed By: CCR-3088 Testing Done: Manual in SE-1
Diffstat (limited to 'zebra/connected.c')
-rw-r--r--zebra/connected.c55
1 files changed, 55 insertions, 0 deletions
diff --git a/zebra/connected.c b/zebra/connected.c
index 290973a5c..9737f8deb 100644
--- a/zebra/connected.c
+++ b/zebra/connected.c
@@ -38,6 +38,7 @@
#include "zebra/interface.h"
#include "zebra/connected.h"
#include "zebra/rtadv.h"
+#include "zebra/zebra_mpls.h"
/* communicate the withdrawal of a connected address */
static void
@@ -213,6 +214,15 @@ connected_up_ipv4 (struct interface *ifp, struct connected *ifc)
zlog_debug ("%u: IF %s IPv4 address add/up, scheduling RIB processing",
ifp->vrf_id, ifp->name);
rib_update (ifp->vrf_id, RIB_UPDATE_IF_CHANGE);
+
+ /* Schedule LSP forwarding entries for processing, if appropriate. */
+ if (ifp->vrf_id == VRF_DEFAULT)
+ {
+ if (IS_ZEBRA_DEBUG_RIB_DETAILED)
+ zlog_debug ("%u: IF %s IPv4 address add/up, scheduling MPLS processing",
+ ifp->vrf_id, ifp->name);
+ zebra_mpls_lsp_schedule (vrf_info_lookup(ifp->vrf_id));
+ }
}
/* Add connected IPv4 route to the interface. */
@@ -333,6 +343,15 @@ connected_down_ipv4 (struct interface *ifp, struct connected *ifc)
ifp->vrf_id, ifp->name);
rib_update (ifp->vrf_id, RIB_UPDATE_IF_CHANGE);
+
+ /* Schedule LSP forwarding entries for processing, if appropriate. */
+ if (ifp->vrf_id == VRF_DEFAULT)
+ {
+ if (IS_ZEBRA_DEBUG_RIB_DETAILED)
+ zlog_debug ("%u: IF %s IPv4 address add/up, scheduling MPLS processing",
+ ifp->vrf_id, ifp->name);
+ zebra_mpls_lsp_schedule (vrf_info_lookup(ifp->vrf_id));
+ }
}
/* Delete connected IPv4 route to the interface. */
@@ -359,6 +378,15 @@ connected_delete_ipv4 (struct interface *ifp, int flags, struct in_addr *addr,
ifp->vrf_id, ifp->name);
rib_update (ifp->vrf_id, RIB_UPDATE_IF_CHANGE);
+
+ /* Schedule LSP forwarding entries for processing, if appropriate. */
+ if (ifp->vrf_id == VRF_DEFAULT)
+ {
+ if (IS_ZEBRA_DEBUG_RIB_DETAILED)
+ zlog_debug ("%u: IF %s IPv4 address add/up, scheduling MPLS processing",
+ ifp->vrf_id, ifp->name);
+ zebra_mpls_lsp_schedule (vrf_info_lookup(ifp->vrf_id));
+ }
}
void
@@ -389,6 +417,15 @@ connected_up_ipv6 (struct interface *ifp, struct connected *ifc)
ifp->vrf_id, ifp->name);
rib_update (ifp->vrf_id, RIB_UPDATE_IF_CHANGE);
+
+ /* Schedule LSP forwarding entries for processing, if appropriate. */
+ if (ifp->vrf_id == VRF_DEFAULT)
+ {
+ if (IS_ZEBRA_DEBUG_RIB_DETAILED)
+ zlog_debug ("%u: IF %s IPv4 address add/up, scheduling MPLS processing",
+ ifp->vrf_id, ifp->name);
+ zebra_mpls_lsp_schedule (vrf_info_lookup(ifp->vrf_id));
+ }
}
/* Add connected IPv6 route to the interface. */
@@ -479,6 +516,15 @@ connected_down_ipv6 (struct interface *ifp, struct connected *ifc)
ifp->vrf_id, ifp->name);
rib_update (ifp->vrf_id, RIB_UPDATE_IF_CHANGE);
+
+ /* Schedule LSP forwarding entries for processing, if appropriate. */
+ if (ifp->vrf_id == VRF_DEFAULT)
+ {
+ if (IS_ZEBRA_DEBUG_RIB_DETAILED)
+ zlog_debug ("%u: IF %s IPv4 address add/up, scheduling MPLS processing",
+ ifp->vrf_id, ifp->name);
+ zebra_mpls_lsp_schedule (vrf_info_lookup(ifp->vrf_id));
+ }
}
void
@@ -504,6 +550,15 @@ connected_delete_ipv6 (struct interface *ifp, struct in6_addr *address,
ifp->vrf_id, ifp->name);
rib_update (ifp->vrf_id, RIB_UPDATE_IF_CHANGE);
+
+ /* Schedule LSP forwarding entries for processing, if appropriate. */
+ if (ifp->vrf_id == VRF_DEFAULT)
+ {
+ if (IS_ZEBRA_DEBUG_RIB_DETAILED)
+ zlog_debug ("%u: IF %s IPv4 address add/up, scheduling MPLS processing",
+ ifp->vrf_id, ifp->name);
+ zebra_mpls_lsp_schedule (vrf_info_lookup(ifp->vrf_id));
+ }
}
int