ospfd: Update Traffic Engineering support
These patches update original code to RFC3630 (OSPF-TE) and add support of
RFC5392 (Inter-AS v2) & RFC7471 (TE metric extensions) and partial support
of RFC6827 (ASON - GMPLS).
* ospfd/ospf_dump.[c,h]: Add new dump functions for Traffic Engineering
* ospfd/ospf_opaque.[c,h]: Add new TLV code points for RFC5392
* ospfd/ospf_packet.c: Update checking of OSPF_OPTION
* ospfd/ospf_vty.[c,h]: Update ospf_str2area_id
* ospfd/ospf_zebra.c: Add new function ospf_interface_link_params() to get
Link Parameters information from the interface to populate Traffic
Engineering metrics
* ospfd/ospfd.[c,h]: Update OSPF_OPTION flags (T -> MT and new DN)
* ospfd/ospf_te.[c,h]: Major modifications to update the code to new
link parameters structure and new RFCs
Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
diff --git a/ospfd/ospf_zebra.c b/ospfd/ospf_zebra.c
index 8940455..3e35979 100644
--- a/ospfd/ospf_zebra.c
+++ b/ospfd/ospf_zebra.c
@@ -48,6 +48,7 @@
#ifdef HAVE_SNMP
#include "ospfd/ospf_snmp.h"
#endif /* HAVE_SNMP */
+#include "ospfd/ospf_te.h"
/* Zebra structure to hold current status. */
struct zclient *zclient = NULL;
@@ -326,6 +327,24 @@
return 0;
}
+static int
+ospf_interface_link_params (int command, struct zclient *zclient,
+ zebra_size_t length)
+{
+ struct interface *ifp;
+
+ ifp = zebra_interface_link_params_read (zclient->ibuf);
+
+ if (ifp == NULL)
+ return 0;
+
+ /* Update TE TLV */
+ ospf_mpls_te_update_if (ifp);
+
+ return 0;
+}
+
+
void
ospf_zebra_add (struct prefix_ipv4 *p, struct ospf_route *or)
{
@@ -1319,6 +1338,8 @@
zclient->interface_down = ospf_interface_state_down;
zclient->interface_address_add = ospf_interface_address_add;
zclient->interface_address_delete = ospf_interface_address_delete;
+ zclient->interface_link_params = ospf_interface_link_params;
+
zclient->ipv4_route_add = ospf_zebra_read_ipv4;
zclient->ipv4_route_delete = ospf_zebra_read_ipv4;