summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bgpd/bgp_evpn_vty.c134
-rw-r--r--doc/developer/workflow.rst23
-rw-r--r--doc/user/pim.rst4
-rw-r--r--isisd/isis_circuit.h1
-rw-r--r--isisd/isis_csm.c32
-rw-r--r--isisd/isis_zebra.c27
-rw-r--r--lib/command.h11
-rw-r--r--ospf6d/ospf6_interface.c2
-rw-r--r--ospf6d/ospf6_message.c2
-rw-r--r--ospf6d/ospf6_network.c2
-rw-r--r--ospf6d/ospf6_network.h1
-rw-r--r--ospf6d/ospf6d.c2
-rw-r--r--staticd/static_routes.c1
13 files changed, 132 insertions, 110 deletions
diff --git a/bgpd/bgp_evpn_vty.c b/bgpd/bgp_evpn_vty.c
index 6369f994a7..016339ef83 100644
--- a/bgpd/bgp_evpn_vty.c
+++ b/bgpd/bgp_evpn_vty.c
@@ -3998,19 +3998,19 @@ DEFUN(show_bgp_l2vpn_evpn_route,
BGP_STR
L2VPN_HELP_STR
EVPN_HELP_STR
- "EVPN route information\n"
+ EVPN_RT_HELP_STR
"Display Detailed Information\n"
- "Specify Route type\n"
- "EAD (Type-1) route\n"
- "EAD (Type-1) route\n"
- "MAC-IP (Type-2) route\n"
- "MAC-IP (Type-2) route\n"
- "Multicast (Type-3) route\n"
- "Multicast (Type-3) route\n"
- "Ethernet Segment (Type-4) route\n"
- "Ethernet Segment (Type-4) route\n"
- "Prefix (Type-5) route\n"
- "Prefix (Type-5) route\n"
+ EVPN_TYPE_HELP_STR
+ EVPN_TYPE_1_HELP_STR
+ EVPN_TYPE_1_HELP_STR
+ EVPN_TYPE_2_HELP_STR
+ EVPN_TYPE_2_HELP_STR
+ EVPN_TYPE_3_HELP_STR
+ EVPN_TYPE_3_HELP_STR
+ EVPN_TYPE_4_HELP_STR
+ EVPN_TYPE_4_HELP_STR
+ EVPN_TYPE_5_HELP_STR
+ EVPN_TYPE_5_HELP_STR
JSON_STR)
{
struct bgp *bgp;
@@ -4074,15 +4074,15 @@ DEFUN(show_bgp_l2vpn_evpn_route_rd,
BGP_STR
L2VPN_HELP_STR
EVPN_HELP_STR
- "EVPN route information\n"
- "Route Distinguisher\n"
- "ASN:XX or A.B.C.D:XX\n"
- "Specify Route type\n"
- "EAD (Type-1) route\n"
- "MAC-IP (Type-2) route\n"
- "Multicast (Type-3) route\n"
- "Ethernet Segment route\n"
- "Prefix route\n"
+ EVPN_RT_HELP_STR
+ EVPN_RT_DIST_HELP_STR
+ EVPN_ASN_IP_HELP_STR
+ EVPN_TYPE_HELP_STR
+ EVPN_TYPE_1_HELP_STR
+ EVPN_TYPE_2_HELP_STR
+ EVPN_TYPE_3_HELP_STR
+ EVPN_TYPE_4_HELP_STR
+ EVPN_TYPE_5_HELP_STR
JSON_STR)
{
struct bgp *bgp;
@@ -4151,9 +4151,9 @@ DEFUN(show_bgp_l2vpn_evpn_route_rd_macip,
BGP_STR
L2VPN_HELP_STR
EVPN_HELP_STR
- "EVPN route information\n"
- "Route Distinguisher\n"
- "ASN:XX or A.B.C.D:XX\n"
+ EVPN_RT_HELP_STR
+ EVPN_RT_DIST_HELP_STR
+ EVPN_ASN_IP_HELP_STR
"MAC\n"
"MAC address (e.g., 00:e0:ec:20:12:62)\n"
"IP\n"
@@ -4227,7 +4227,7 @@ DEFUN(show_bgp_l2vpn_evpn_route_esi,
BGP_STR
L2VPN_HELP_STR
EVPN_HELP_STR
- "EVPN route information\n"
+ EVPN_RT_HELP_STR
"Ethernet Segment Identifier\n"
"ESI ID\n"
JSON_STR)
@@ -4273,13 +4273,13 @@ DEFUN(show_bgp_l2vpn_evpn_route_vni, show_bgp_l2vpn_evpn_route_vni_cmd,
BGP_STR
L2VPN_HELP_STR
EVPN_HELP_STR
- "EVPN route information\n"
+ EVPN_RT_HELP_STR
"VXLAN Network Identifier\n"
"VNI number\n"
- "Specify Route type\n"
- "EAD (Type-1) route\n"
- "MAC-IP (Type-2) route\n"
- "Multicast (Type-3) route\n"
+ EVPN_TYPE_HELP_STR
+ EVPN_TYPE_1_HELP_STR
+ EVPN_TYPE_2_HELP_STR
+ EVPN_TYPE_3_HELP_STR
"Remote VTEP\n"
"Remote VTEP IP address\n"
JSON_STR)
@@ -4349,7 +4349,7 @@ DEFUN(show_bgp_l2vpn_evpn_route_vni_macip,
BGP_STR
L2VPN_HELP_STR
EVPN_HELP_STR
- "EVPN route information\n"
+ EVPN_RT_HELP_STR
"VXLAN Network Identifier\n"
"VNI number\n"
"MAC\n"
@@ -4419,10 +4419,10 @@ DEFUN(show_bgp_l2vpn_evpn_route_vni_multicast,
BGP_STR
L2VPN_HELP_STR
EVPN_HELP_STR
- "EVPN route information\n"
+ EVPN_RT_HELP_STR
"VXLAN Network Identifier\n"
"VNI number\n"
- "Multicast (Type-3) route\n"
+ EVPN_TYPE_3_HELP_STR
"Originating Router IP address\n"
JSON_STR)
{
@@ -4477,7 +4477,7 @@ DEFUN(show_bgp_l2vpn_evpn_route_vni_all,
BGP_STR
L2VPN_HELP_STR
EVPN_HELP_STR
- "EVPN route information\n"
+ EVPN_RT_HELP_STR
"VXLAN Network Identifier\n"
"All VNIs\n"
"Print Detailed Output\n"
@@ -4706,30 +4706,30 @@ ALIAS_HIDDEN(show_bgp_l2vpn_evpn_summary, show_bgp_evpn_summary_cmd,
ALIAS_HIDDEN(show_bgp_l2vpn_evpn_route, show_bgp_evpn_route_cmd,
"show bgp evpn route [detail] [type <macip|multicast>]",
SHOW_STR BGP_STR EVPN_HELP_STR
- "EVPN route information\n"
+ EVPN_RT_HELP_STR
"Display Detailed Information\n"
- "Specify Route type\n"
- "MAC-IP (Type-2) route\n"
- "Multicast (Type-3) route\n")
+ EVPN_TYPE_HELP_STR
+ EVPN_TYPE_2_HELP_STR
+ EVPN_TYPE_3_HELP_STR)
ALIAS_HIDDEN(
show_bgp_l2vpn_evpn_route_rd, show_bgp_evpn_route_rd_cmd,
"show bgp evpn route rd ASN:NN_OR_IP-ADDRESS:NN [type <macip|multicast>]",
SHOW_STR BGP_STR EVPN_HELP_STR
- "EVPN route information\n"
- "Route Distinguisher\n"
- "ASN:XX or A.B.C.D:XX\n"
- "Specify Route type\n"
- "MAC-IP (Type-2) route\n"
- "Multicast (Type-3) route\n")
+ EVPN_RT_HELP_STR
+ EVPN_RT_DIST_HELP_STR
+ EVPN_ASN_IP_HELP_STR
+ EVPN_TYPE_HELP_STR
+ EVPN_TYPE_2_HELP_STR
+ EVPN_TYPE_3_HELP_STR)
ALIAS_HIDDEN(
show_bgp_l2vpn_evpn_route_rd_macip, show_bgp_evpn_route_rd_macip_cmd,
"show bgp evpn route rd ASN:NN_OR_IP-ADDRESS:NN mac WORD [ip WORD]",
SHOW_STR BGP_STR EVPN_HELP_STR
- "EVPN route information\n"
- "Route Distinguisher\n"
- "ASN:XX or A.B.C.D:XX\n"
+ EVPN_RT_HELP_STR
+ EVPN_RT_DIST_HELP_STR
+ EVPN_ASN_IP_HELP_STR
"MAC\n"
"MAC address (e.g., 00:e0:ec:20:12:62)\n"
"IP\n"
@@ -4739,12 +4739,12 @@ ALIAS_HIDDEN(
show_bgp_l2vpn_evpn_route_vni, show_bgp_evpn_route_vni_cmd,
"show bgp evpn route vni " CMD_VNI_RANGE " [<type <macip|multicast> | vtep A.B.C.D>]",
SHOW_STR BGP_STR EVPN_HELP_STR
- "EVPN route information\n"
+ EVPN_RT_HELP_STR
"VXLAN Network Identifier\n"
"VNI number\n"
- "Specify Route type\n"
- "MAC-IP (Type-2) route\n"
- "Multicast (Type-3) route\n"
+ EVPN_TYPE_HELP_STR
+ EVPN_TYPE_2_HELP_STR
+ EVPN_TYPE_3_HELP_STR
"Remote VTEP\n"
"Remote VTEP IP address\n")
@@ -4752,7 +4752,7 @@ ALIAS_HIDDEN(show_bgp_l2vpn_evpn_route_vni_macip,
show_bgp_evpn_route_vni_macip_cmd,
"show bgp evpn route vni " CMD_VNI_RANGE " mac WORD [ip WORD]",
SHOW_STR BGP_STR EVPN_HELP_STR
- "EVPN route information\n"
+ EVPN_RT_HELP_STR
"VXLAN Network Identifier\n"
"VNI number\n"
"MAC\n"
@@ -4764,16 +4764,16 @@ ALIAS_HIDDEN(show_bgp_l2vpn_evpn_route_vni_multicast,
show_bgp_evpn_route_vni_multicast_cmd,
"show bgp evpn route vni " CMD_VNI_RANGE " multicast A.B.C.D",
SHOW_STR BGP_STR EVPN_HELP_STR
- "EVPN route information\n"
+ EVPN_RT_HELP_STR
"VXLAN Network Identifier\n"
"VNI number\n"
- "Multicast (Type-3) route\n"
+ EVPN_TYPE_3_HELP_STR
"Originating Router IP address\n")
ALIAS_HIDDEN(show_bgp_l2vpn_evpn_route_vni_all, show_bgp_evpn_route_vni_all_cmd,
"show bgp evpn route vni all [detail] [vtep A.B.C.D]",
SHOW_STR BGP_STR EVPN_HELP_STR
- "EVPN route information\n"
+ EVPN_RT_HELP_STR
"VXLAN Network Identifier\n"
"All VNIs\n"
"Print Detailed Output\n"
@@ -4854,8 +4854,8 @@ DEFUN_NOSH (exit_vni,
DEFUN (bgp_evpn_vrf_rd,
bgp_evpn_vrf_rd_cmd,
"rd ASN:NN_OR_IP-ADDRESS:NN",
- "Route Distinguisher\n"
- "ASN:XX or A.B.C.D:XX\n")
+ EVPN_RT_DIST_HELP_STR
+ EVPN_ASN_IP_HELP_STR)
{
int ret;
struct prefix_rd prd;
@@ -4883,8 +4883,8 @@ DEFUN (no_bgp_evpn_vrf_rd,
no_bgp_evpn_vrf_rd_cmd,
"no rd ASN:NN_OR_IP-ADDRESS:NN",
NO_STR
- "Route Distinguisher\n"
- "ASN:XX or A.B.C.D:XX\n")
+ EVPN_RT_DIST_HELP_STR
+ EVPN_ASN_IP_HELP_STR)
{
int ret;
struct prefix_rd prd;
@@ -4919,7 +4919,7 @@ DEFUN (no_bgp_evpn_vrf_rd_without_val,
no_bgp_evpn_vrf_rd_without_val_cmd,
"no rd",
NO_STR
- "Route Distinguisher\n")
+ EVPN_RT_DIST_HELP_STR)
{
struct bgp *bgp_vrf = VTY_GET_CONTEXT(bgp);
@@ -4939,8 +4939,8 @@ DEFUN (no_bgp_evpn_vrf_rd_without_val,
DEFUN (bgp_evpn_vni_rd,
bgp_evpn_vni_rd_cmd,
"rd ASN:NN_OR_IP-ADDRESS:NN",
- "Route Distinguisher\n"
- "ASN:XX or A.B.C.D:XX\n")
+ EVPN_RT_DIST_HELP_STR
+ EVPN_ASN_IP_HELP_STR)
{
struct prefix_rd prd;
struct bgp *bgp = VTY_GET_CONTEXT(bgp);
@@ -4975,8 +4975,8 @@ DEFUN (no_bgp_evpn_vni_rd,
no_bgp_evpn_vni_rd_cmd,
"no rd ASN:NN_OR_IP-ADDRESS:NN",
NO_STR
- "Route Distinguisher\n"
- "ASN:XX or A.B.C.D:XX\n")
+ EVPN_RT_DIST_HELP_STR
+ EVPN_ASN_IP_HELP_STR)
{
struct prefix_rd prd;
struct bgp *bgp = VTY_GET_CONTEXT(bgp);
@@ -5018,7 +5018,7 @@ DEFUN (no_bgp_evpn_vni_rd_without_val,
no_bgp_evpn_vni_rd_without_val_cmd,
"no rd",
NO_STR
- "Route Distinguisher\n")
+ EVPN_RT_DIST_HELP_STR)
{
struct bgp *bgp = VTY_GET_CONTEXT(bgp);
VTY_DECLVAR_CONTEXT_SUB(bgpevpn, vpn);
@@ -5249,7 +5249,7 @@ DEFUN (no_bgp_evpn_vrf_rt,
"import and export\n"
"import\n"
"export\n"
- "ASN:XX or A.B.C.D:XX\n")
+ EVPN_ASN_IP_HELP_STR)
{
struct bgp *bgp = VTY_GET_CONTEXT(bgp);
int rt_type, found_ecomdel;
@@ -5413,7 +5413,7 @@ DEFUN (no_bgp_evpn_vni_rt,
"import and export\n"
"import\n"
"export\n"
- "ASN:XX or A.B.C.D:XX\n")
+ EVPN_ASN_IP_HELP_STR)
{
struct bgp *bgp = VTY_GET_CONTEXT(bgp);
VTY_DECLVAR_CONTEXT_SUB(bgpevpn, vpn);
diff --git a/doc/developer/workflow.rst b/doc/developer/workflow.rst
index f345464a35..4183ac6480 100644
--- a/doc/developer/workflow.rst
+++ b/doc/developer/workflow.rst
@@ -779,13 +779,12 @@ necessary replacements.
.. _style-exceptions:
Exceptions
-^^^^^^^^^^
+""""""""""
FRR project code comes from a variety of sources, so there are some
stylistic exceptions in place. They are organized here by branch.
-For ``master``
-""""""""""""""
+For ``master``:
BSD coding style applies to:
@@ -797,8 +796,7 @@ BSD coding style applies to:
- Indents are 4 spaces
- Function return types are on their own line
-For ``stable/3.0`` and ``stable/2.0``
-"""""""""""""""""""""""""""""""""""""
+For ``stable/3.0`` and ``stable/2.0``:
GNU coding style apply to the following parts:
@@ -816,6 +814,21 @@ BSD coding style applies to:
- ``ldpd/``
+
+Python Code
+^^^^^^^^^^^
+
+Format all Python code with `black <https://github.com/psf/black>`_.
+
+In a line::
+
+ python3 -m black <file.py>
+
+Run this on any Python files you modify before committing.
+
+FRR's Python code has been formatted with black version 19.10b.
+
+
YANG
^^^^
diff --git a/doc/user/pim.rst b/doc/user/pim.rst
index b33ca3f2f4..b0a90bfc48 100644
--- a/doc/user/pim.rst
+++ b/doc/user/pim.rst
@@ -337,10 +337,10 @@ caution. Most of the time this will not be necessary.
Insert into the Multicast Rib Route A.B.C.D/M using the specified INTERFACE.
The distance can be specified as well if desired.
-.. _msdp-configuration
+.. _msdp-configuration:
Multicast Source Discovery Protocol (MSDP) Configuration
-====================
+========================================================
.. index:: ip msdp mesh-group [WORD] member A.B.C.D
.. clicmd:: ip msdp mesh-group [WORD] member A.B.C.D
diff --git a/isisd/isis_circuit.h b/isisd/isis_circuit.h
index 5766d1962f..ec5d738ce6 100644
--- a/isisd/isis_circuit.h
+++ b/isisd/isis_circuit.h
@@ -79,6 +79,7 @@ struct isis_circuit_arg {
struct isis_circuit {
int state;
uint8_t circuit_id; /* l1/l2 bcast CircuitID */
+ struct isis *isis;
struct isis_area *area; /* back pointer to the area */
struct interface *interface; /* interface info from z */
int fd; /* IS-IS l1/2 socket */
diff --git a/isisd/isis_csm.c b/isisd/isis_csm.c
index 929b4c26e8..f5ad0aff48 100644
--- a/isisd/isis_csm.c
+++ b/isisd/isis_csm.c
@@ -83,16 +83,17 @@ isis_csm_state_change(int event, struct isis_circuit *circuit, void *arg)
circuit->state = C_STATE_CONF;
break;
case IF_UP_FROM_Z:
- circuit = isis_circuit_new();
- isis_circuit_if_add(circuit, (struct interface *)arg);
- isis = isis_lookup_by_vrfid(circuit->interface->vrf_id);
+ isis = isis_lookup_by_vrfid(((struct interface *)arg)->vrf_id);
if (isis == NULL) {
zlog_warn(
" %s : ISIS routing instance not found",
__func__);
break;
}
+ circuit = isis_circuit_new();
+ isis_circuit_if_add(circuit, (struct interface *)arg);
listnode_add(isis->init_circ_list, circuit);
+ circuit->isis = isis;
circuit->state = C_STATE_INIT;
break;
case ISIS_DISABLE:
@@ -117,7 +118,7 @@ isis_csm_state_change(int event, struct isis_circuit *circuit, void *arg)
circuit->state = C_STATE_UP;
isis_event_circuit_state_change(circuit, circuit->area,
1);
- listnode_delete(circuit->area->isis->init_circ_list,
+ listnode_delete(circuit->isis->init_circ_list,
circuit);
break;
case IF_UP_FROM_Z:
@@ -129,15 +130,8 @@ isis_csm_state_change(int event, struct isis_circuit *circuit, void *arg)
break;
case IF_DOWN_FROM_Z:
isis_circuit_if_del(circuit, (struct interface *)arg);
- isis = isis_lookup_by_vrfid(circuit->interface->vrf_id);
- if (isis == NULL) {
- zlog_warn(
- "%s : ISIS routing instance not found",
- __func__);
- break;
- }
-
- listnode_delete(isis->init_circ_list, circuit);
+ listnode_delete(circuit->isis->init_circ_list,
+ circuit);
isis_circuit_del(circuit);
circuit = NULL;
break;
@@ -152,6 +146,7 @@ isis_csm_state_change(int event, struct isis_circuit *circuit, void *arg)
case IF_UP_FROM_Z:
isis_circuit_if_add(circuit, (struct interface *)arg);
if (isis_circuit_up(circuit) != ISIS_OK) {
+ isis_circuit_if_del(circuit, (struct interface *)arg);
flog_err(
EC_ISIS_CONFIG,
"Could not bring up %s because of invalid config.",
@@ -183,22 +178,15 @@ isis_csm_state_change(int event, struct isis_circuit *circuit, void *arg)
zlog_warn("circuit already connected");
break;
case ISIS_DISABLE:
+ isis = circuit->area->isis;
isis_circuit_down(circuit);
isis_circuit_deconfigure(circuit,
(struct isis_area *)arg);
circuit->state = C_STATE_INIT;
isis_event_circuit_state_change(
circuit, (struct isis_area *)arg, 0);
-
- isis = isis_lookup_by_vrfid(circuit->interface->vrf_id);
- if (isis == NULL) {
- zlog_warn(
- "%s : ISIS routing instance not found",
- __func__);
- break;
- }
-
listnode_add(isis->init_circ_list, circuit);
+ circuit->isis = isis;
break;
case IF_DOWN_FROM_Z:
isis_circuit_down(circuit);
diff --git a/isisd/isis_zebra.c b/isisd/isis_zebra.c
index 15b51589ae..9ed868e795 100644
--- a/isisd/isis_zebra.c
+++ b/isisd/isis_zebra.c
@@ -85,9 +85,12 @@ static int isis_router_id_update_zebra(ZAPI_CALLBACK_ARGS)
static int isis_zebra_if_address_add(ZAPI_CALLBACK_ARGS)
{
+ struct isis_circuit *circuit;
struct connected *c;
+#ifdef EXTREME_DEBUG
struct prefix *p;
char buf[PREFIX2STR_BUFFER];
+#endif /* EXTREME_DEBUG */
c = zebra_interface_address_read(ZEBRA_INTERFACE_ADDRESS_ADD,
zclient->ibuf, vrf_id);
@@ -95,25 +98,29 @@ static int isis_zebra_if_address_add(ZAPI_CALLBACK_ARGS)
if (c == NULL)
return 0;
+#ifdef EXTREME_DEBUG
p = c->address;
-
prefix2str(p, buf, sizeof(buf));
-#ifdef EXTREME_DEBUG
+
if (p->family == AF_INET)
zlog_debug("connected IP address %s", buf);
if (p->family == AF_INET6)
zlog_debug("connected IPv6 address %s", buf);
#endif /* EXTREME_DEBUG */
- if (if_is_operative(c->ifp))
- isis_circuit_add_addr(circuit_scan_by_ifp(c->ifp), c);
+
+ if (if_is_operative(c->ifp)) {
+ circuit = circuit_scan_by_ifp(c->ifp);
+ if (circuit)
+ isis_circuit_add_addr(circuit, c);
+ }
return 0;
}
static int isis_zebra_if_address_del(ZAPI_CALLBACK_ARGS)
{
+ struct isis_circuit *circuit;
struct connected *c;
- struct interface *ifp;
#ifdef EXTREME_DEBUG
struct prefix *p;
char buf[PREFIX2STR_BUFFER];
@@ -125,8 +132,6 @@ static int isis_zebra_if_address_del(ZAPI_CALLBACK_ARGS)
if (c == NULL)
return 0;
- ifp = c->ifp;
-
#ifdef EXTREME_DEBUG
p = c->address;
prefix2str(p, buf, sizeof(buf));
@@ -137,8 +142,12 @@ static int isis_zebra_if_address_del(ZAPI_CALLBACK_ARGS)
zlog_debug("disconnected IPv6 address %s", buf);
#endif /* EXTREME_DEBUG */
- if (if_is_operative(ifp))
- isis_circuit_del_addr(circuit_scan_by_ifp(ifp), c);
+ if (if_is_operative(c->ifp)) {
+ circuit = circuit_scan_by_ifp(c->ifp);
+ if (circuit)
+ isis_circuit_del_addr(circuit, c);
+ }
+
connected_free(&c);
return 0;
diff --git a/lib/command.h b/lib/command.h
index dc148a92a8..677d4b2dad 100644
--- a/lib/command.h
+++ b/lib/command.h
@@ -452,6 +452,17 @@ struct cmd_node {
#define GR_NEIGHBOR_HELPER_CMD "Graceful Restart Helper command for a neighbor\n"
#define NO_GR_NEIGHBOR_HELPER_CMD "Undo Graceful Restart Helper command for a neighbor\n"
+/* EVPN help Strings */
+#define EVPN_RT_HELP_STR "EVPN route information\n"
+#define EVPN_RT_DIST_HELP_STR "Route Distinguisher\n"
+#define EVPN_ASN_IP_HELP_STR "ASN:XX or A.B.C.D:XX\n"
+#define EVPN_TYPE_HELP_STR "Specify Route type\n"
+#define EVPN_TYPE_1_HELP_STR "EAD (Type-1) route\n"
+#define EVPN_TYPE_2_HELP_STR "MAC-IP (Type-2) route\n"
+#define EVPN_TYPE_3_HELP_STR "Multicast (Type-3) route\n"
+#define EVPN_TYPE_4_HELP_STR "Ethernet Segment (Type-4) route\n"
+#define EVPN_TYPE_5_HELP_STR "Prefix (Type-5) route\n"
+
/* Prototypes. */
extern void install_node(struct cmd_node *node);
extern void install_default(enum node_type);
diff --git a/ospf6d/ospf6_interface.c b/ospf6d/ospf6_interface.c
index fabcc426ea..334f1bd2a5 100644
--- a/ospf6d/ospf6_interface.c
+++ b/ospf6d/ospf6_interface.c
@@ -31,10 +31,10 @@
#include "ospf6_lsa.h"
#include "ospf6_lsdb.h"
+#include "ospf6_top.h"
#include "ospf6_network.h"
#include "ospf6_message.h"
#include "ospf6_route.h"
-#include "ospf6_top.h"
#include "ospf6_area.h"
#include "ospf6_interface.h"
#include "ospf6_neighbor.h"
diff --git a/ospf6d/ospf6_message.c b/ospf6d/ospf6_message.c
index eb8c414d9b..02daaf6c2c 100644
--- a/ospf6d/ospf6_message.c
+++ b/ospf6d/ospf6_message.c
@@ -31,10 +31,10 @@
#include "ospf6_proto.h"
#include "ospf6_lsa.h"
#include "ospf6_lsdb.h"
+#include "ospf6_top.h"
#include "ospf6_network.h"
#include "ospf6_message.h"
-#include "ospf6_top.h"
#include "ospf6_area.h"
#include "ospf6_neighbor.h"
#include "ospf6_interface.h"
diff --git a/ospf6d/ospf6_network.c b/ospf6d/ospf6_network.c
index abbb180d45..6c83881bf4 100644
--- a/ospf6d/ospf6_network.c
+++ b/ospf6d/ospf6_network.c
@@ -30,9 +30,9 @@
#include "libospf.h"
#include "ospf6_proto.h"
+#include "ospf6_top.h"
#include "ospf6_network.h"
#include "ospf6d.h"
-#include "ospf6_top.h"
struct in6_addr allspfrouters6;
struct in6_addr alldrouters6;
diff --git a/ospf6d/ospf6_network.h b/ospf6d/ospf6_network.h
index eeef0514f3..d11a611c49 100644
--- a/ospf6d/ospf6_network.h
+++ b/ospf6d/ospf6_network.h
@@ -21,7 +21,6 @@
#ifndef OSPF6_NETWORK_H
#define OSPF6_NETWORK_H
-struct ospf6 *ospf6;
extern struct in6_addr allspfrouters6;
extern struct in6_addr alldrouters6;
diff --git a/ospf6d/ospf6d.c b/ospf6d/ospf6d.c
index e904482391..65607fc131 100644
--- a/ospf6d/ospf6d.c
+++ b/ospf6d/ospf6d.c
@@ -27,6 +27,7 @@
#include "plist.h"
#include "ospf6_proto.h"
+#include "ospf6_top.h"
#include "ospf6_network.h"
#include "ospf6_lsa.h"
#include "ospf6_lsdb.h"
@@ -34,7 +35,6 @@
#include "ospf6_route.h"
#include "ospf6_zebra.h"
#include "ospf6_spf.h"
-#include "ospf6_top.h"
#include "ospf6_area.h"
#include "ospf6_interface.h"
#include "ospf6_neighbor.h"
diff --git a/staticd/static_routes.c b/staticd/static_routes.c
index d6aab296c9..d105b2123f 100644
--- a/staticd/static_routes.c
+++ b/staticd/static_routes.c
@@ -283,6 +283,7 @@ static_add_nexthop(struct route_node *rn, struct static_path *pn, safi_t safi,
break;
case STATIC_BLACKHOLE:
+ nh->bh_type = STATIC_BLACKHOLE_NULL;
break;
case STATIC_IFNAME:
ifp = if_lookup_by_name(ifname, nh_svrf->vrf->vrf_id);