ospf6d: implement admin distance
Until today the admin distance cannot be configured for any IPv6
routing protocol. This patch implements it for ospf6.
Signed-off-by: Maitane Zotes <maz@open.ch>
diff --git a/ospf6d/ospf6_zebra.h b/ospf6d/ospf6_zebra.h
index 05694d3..51eb9d7 100644
--- a/ospf6d/ospf6_zebra.h
+++ b/ospf6d/ospf6_zebra.h
@@ -23,6 +23,7 @@
#define OSPF6_ZEBRA_H
#include "zclient.h"
+#include "ospf6_top.h"
/* Debug option */
extern unsigned char conf_debug_ospf6_zebra;
@@ -35,6 +36,16 @@
#define IS_OSPF6_DEBUG_ZEBRA(e) \
(conf_debug_ospf6_zebra & OSPF6_DEBUG_ZEBRA_ ## e)
+/* OSPF6 distance */
+struct ospf6_distance
+{
+ /* Distance value for the IP source prefix */
+ u_char distance;
+
+ /* Name of the access-list to be matched */
+ char *access_list;
+};
+
extern struct zclient *zclient;
extern void ospf6_zebra_route_update_add (struct ospf6_route *request);
@@ -44,6 +55,15 @@
extern void ospf6_zebra_no_redistribute (int);
#define ospf6_zebra_is_redistribute(type) \
vrf_bitmap_check (zclient->redist[type], VRF_DEFAULT)
+
+extern void ospf6_distance_reset (struct ospf6 *);
+extern u_char ospf6_distance_apply (struct ospf6_route *,
+ struct ospf6 *);
+extern int ospf6_distance_set (struct vty *, struct ospf6 *, const char *,
+ const char *, const char *);
+extern int ospf6_distance_unset (struct vty *, struct ospf6 *, const char *,
+ const char *);
+
extern void ospf6_zebra_init(struct thread_master *);
extern int config_write_ospf6_debug_zebra (struct vty *vty);