mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-14 10:37:29 +00:00
[ospfd] Add passive-interface default support
2006-10-22 Yar Tikhiy <yar@comp.chem.msu.su> * (general) Add support for passive-interface default (with minor edits by Paul Jakma). * ospf_interface.h: Add OSPF_IF_PASSIVE_STATUS macro, looking at configured value, or the global 'default' value, as required. * ospf_interface.c: (ospf_if_new_hook) Leave passive unconfigured per default, allowing global 'default' to take effect for unconfigured interfaces. * ospf_packet.c: (various) use OSPF_IF_PASSIVE_STATUS * ospf_vty.c: (ospf_passive_interface_default) new function, unset passive from all interfaces if default is enabled, as the per-iface settings become redundant. (ospf_passive_interface_update) new func, update passive setting taking global default into account. ({no,}ospf_passive_interface_addr_cmd) Add support for 'default' variant of command. (show_ip_ospf_interface_sub) Update to take global default into account when printing passive status. (ospf_config_write) ditto. * ospfd.c: (ospf_new) set global passive-interface default. * ospfd.h: (struct ospf) Add field for global passive-interface.
This commit is contained in:
parent
6f58544db5
commit
7ffa8fa232
@ -1,3 +1,28 @@
|
|||||||
|
2006-10-22 Yar Tikhiy <yar@comp.chem.msu.su>
|
||||||
|
|
||||||
|
* (general) Add support for passive-interface default (with
|
||||||
|
minor edits by Paul Jakma).
|
||||||
|
* ospf_interface.h: Add OSPF_IF_PASSIVE_STATUS macro, looking
|
||||||
|
at configured value, or the global 'default' value, as
|
||||||
|
required.
|
||||||
|
* ospf_interface.c: (ospf_if_new_hook) Leave passive
|
||||||
|
unconfigured per default, allowing global 'default' to
|
||||||
|
take effect for unconfigured interfaces.
|
||||||
|
* ospf_packet.c: (various) use OSPF_IF_PASSIVE_STATUS
|
||||||
|
* ospf_vty.c: (ospf_passive_interface_default) new function,
|
||||||
|
unset passive from all interfaces if default is enabled, as
|
||||||
|
the per-iface settings become redundant.
|
||||||
|
(ospf_passive_interface_update) new func, update passive
|
||||||
|
setting taking global default into account.
|
||||||
|
({no,}ospf_passive_interface_addr_cmd) Add support for
|
||||||
|
'default' variant of command.
|
||||||
|
(show_ip_ospf_interface_sub) Update to take global
|
||||||
|
default into account when printing passive status.
|
||||||
|
(ospf_config_write) ditto.
|
||||||
|
* ospfd.c: (ospf_new) set global passive-interface default.
|
||||||
|
* ospfd.h: (struct ospf) Add field for global
|
||||||
|
passive-interface.
|
||||||
|
|
||||||
2006-09-25 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
|
2006-09-25 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
|
||||||
|
|
||||||
* ospf_packet.c: (ospf_packet_dup, ospf_make_md5_digest)
|
* ospf_packet.c: (ospf_packet_dup, ospf_make_md5_digest)
|
||||||
|
@ -682,9 +682,6 @@ ospf_if_new_hook (struct interface *ifp)
|
|||||||
|
|
||||||
IF_DEF_PARAMS (ifp)->mtu_ignore = OSPF_MTU_IGNORE_DEFAULT;
|
IF_DEF_PARAMS (ifp)->mtu_ignore = OSPF_MTU_IGNORE_DEFAULT;
|
||||||
|
|
||||||
SET_IF_PARAM (IF_DEF_PARAMS (ifp), passive_interface);
|
|
||||||
IF_DEF_PARAMS (ifp)->passive_interface = OSPF_IF_ACTIVE;
|
|
||||||
|
|
||||||
SET_IF_PARAM (IF_DEF_PARAMS (ifp), v_hello);
|
SET_IF_PARAM (IF_DEF_PARAMS (ifp), v_hello);
|
||||||
IF_DEF_PARAMS (ifp)->v_hello = OSPF_HELLO_INTERVAL_DEFAULT;
|
IF_DEF_PARAMS (ifp)->v_hello = OSPF_HELLO_INTERVAL_DEFAULT;
|
||||||
|
|
||||||
|
@ -50,6 +50,13 @@ struct ospf_if_params
|
|||||||
DECLARE_IF_PARAM (u_char, type); /* type of interface */
|
DECLARE_IF_PARAM (u_char, type); /* type of interface */
|
||||||
#define OSPF_IF_ACTIVE 0
|
#define OSPF_IF_ACTIVE 0
|
||||||
#define OSPF_IF_PASSIVE 1
|
#define OSPF_IF_PASSIVE 1
|
||||||
|
|
||||||
|
#define OSPF_IF_PASSIVE_STATUS(O) \
|
||||||
|
(OSPF_IF_PARAM_CONFIGURED((O)->params, passive_interface) ? \
|
||||||
|
(O)->params->passive_interface : \
|
||||||
|
(OSPF_IF_PARAM_CONFIGURED(IF_DEF_PARAMS((O)->ifp), passive_interface) ? \
|
||||||
|
IF_DEF_PARAMS((O)->ifp)->passive_interface : \
|
||||||
|
(O)->ospf->passive_interface_default))
|
||||||
|
|
||||||
DECLARE_IF_PARAM (u_int32_t, v_hello); /* Hello Interval */
|
DECLARE_IF_PARAM (u_int32_t, v_hello); /* Hello Interval */
|
||||||
DECLARE_IF_PARAM (u_int32_t, v_wait); /* Router Dead Interval */
|
DECLARE_IF_PARAM (u_int32_t, v_wait); /* Router Dead Interval */
|
||||||
|
@ -762,7 +762,7 @@ ospf_hello (struct ip *iph, struct ospf_header *ospfh,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* If incoming interface is passive one, ignore Hello. */
|
/* If incoming interface is passive one, ignore Hello. */
|
||||||
if (OSPF_IF_PARAM (oi, passive_interface) == OSPF_IF_PASSIVE) {
|
if (OSPF_IF_PASSIVE_STATUS (oi) == OSPF_IF_PASSIVE) {
|
||||||
char buf[3][INET_ADDRSTRLEN];
|
char buf[3][INET_ADDRSTRLEN];
|
||||||
zlog_debug ("ignoring HELLO from router %s sent to %s, "
|
zlog_debug ("ignoring HELLO from router %s sent to %s, "
|
||||||
"received on a passive interface, %s",
|
"received on a passive interface, %s",
|
||||||
@ -2978,7 +2978,7 @@ ospf_poll_send (struct ospf_nbr_nbma *nbr_nbma)
|
|||||||
assert(oi);
|
assert(oi);
|
||||||
|
|
||||||
/* If this is passive interface, do not send OSPF Hello. */
|
/* If this is passive interface, do not send OSPF Hello. */
|
||||||
if (OSPF_IF_PARAM (oi, passive_interface) == OSPF_IF_PASSIVE)
|
if (OSPF_IF_PASSIVE_STATUS (oi) == OSPF_IF_PASSIVE)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (oi->type != OSPF_IFTYPE_NBMA)
|
if (oi->type != OSPF_IFTYPE_NBMA)
|
||||||
@ -3046,7 +3046,7 @@ ospf_hello_send (struct ospf_interface *oi)
|
|||||||
u_int16_t length = OSPF_HEADER_SIZE;
|
u_int16_t length = OSPF_HEADER_SIZE;
|
||||||
|
|
||||||
/* If this is passive interface, do not send OSPF Hello. */
|
/* If this is passive interface, do not send OSPF Hello. */
|
||||||
if (OSPF_IF_PARAM (oi, passive_interface) == OSPF_IF_PASSIVE)
|
if (OSPF_IF_PASSIVE_STATUS (oi) == OSPF_IF_PASSIVE)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
op = ospf_packet_new (oi->ifp->mtu);
|
op = ospf_packet_new (oi->ifp->mtu);
|
||||||
|
191
ospfd/ospf_vty.c
191
ospfd/ospf_vty.c
@ -249,39 +249,98 @@ ALIAS (no_ospf_router_id,
|
|||||||
NO_STR
|
NO_STR
|
||||||
"router-id for the OSPF process\n")
|
"router-id for the OSPF process\n")
|
||||||
|
|
||||||
|
static void
|
||||||
|
ospf_passive_interface_default (struct ospf *ospf)
|
||||||
|
{
|
||||||
|
struct listnode *ln;
|
||||||
|
struct interface *ifp;
|
||||||
|
struct ospf_interface *oi;
|
||||||
|
|
||||||
|
for (ALL_LIST_ELEMENTS_RO (om->iflist, ln, ifp))
|
||||||
|
{
|
||||||
|
if (ifp &&
|
||||||
|
OSPF_IF_PARAM_CONFIGURED (IF_DEF_PARAMS (ifp), passive_interface))
|
||||||
|
UNSET_IF_PARAM (IF_DEF_PARAMS (ifp), passive_interface);
|
||||||
|
}
|
||||||
|
for (ALL_LIST_ELEMENTS_RO (ospf->oiflist, ln, oi))
|
||||||
|
{
|
||||||
|
if (OSPF_IF_PARAM_CONFIGURED (oi->params, passive_interface))
|
||||||
|
UNSET_IF_PARAM (oi->params, passive_interface);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
ospf_passive_interface_update (struct ospf *ospf, struct interface *ifp,
|
||||||
|
struct in_addr addr,
|
||||||
|
struct ospf_if_params *params, u_char value)
|
||||||
|
{
|
||||||
|
u_char dflt;
|
||||||
|
|
||||||
|
params->passive_interface = value;
|
||||||
|
if (params != IF_DEF_PARAMS (ifp))
|
||||||
|
{
|
||||||
|
if (OSPF_IF_PARAM_CONFIGURED (IF_DEF_PARAMS (ifp), passive_interface))
|
||||||
|
dflt = IF_DEF_PARAMS (ifp)->passive_interface;
|
||||||
|
else
|
||||||
|
dflt = ospf->passive_interface_default;
|
||||||
|
|
||||||
|
if (value != dflt)
|
||||||
|
SET_IF_PARAM (params, passive_interface);
|
||||||
|
else
|
||||||
|
UNSET_IF_PARAM (params, passive_interface);
|
||||||
|
|
||||||
|
ospf_free_if_params (ifp, addr);
|
||||||
|
ospf_if_update_params (ifp, addr);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (value != ospf->passive_interface_default)
|
||||||
|
SET_IF_PARAM (params, passive_interface);
|
||||||
|
else
|
||||||
|
UNSET_IF_PARAM (params, passive_interface);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
DEFUN (ospf_passive_interface,
|
DEFUN (ospf_passive_interface,
|
||||||
ospf_passive_interface_addr_cmd,
|
ospf_passive_interface_addr_cmd,
|
||||||
"passive-interface IFNAME A.B.C.D",
|
"passive-interface IFNAME A.B.C.D",
|
||||||
"Suppress routing updates on an interface\n"
|
"Suppress routing updates on an interface\n"
|
||||||
"Interface's name\n")
|
"Interface's name\n")
|
||||||
{
|
{
|
||||||
struct interface *ifp;
|
struct interface *ifp;
|
||||||
struct in_addr addr;
|
struct in_addr addr;
|
||||||
int ret;
|
int ret;
|
||||||
struct ospf_if_params *params;
|
struct ospf_if_params *params;
|
||||||
struct route_node *rn;
|
struct route_node *rn;
|
||||||
|
struct ospf *ospf = vty->index;
|
||||||
|
|
||||||
ifp = if_get_by_name (argv[0]);
|
ifp = if_get_by_name (argv[0]);
|
||||||
|
|
||||||
params = IF_DEF_PARAMS (ifp);
|
params = IF_DEF_PARAMS (ifp);
|
||||||
|
|
||||||
if (argc == 2)
|
if (argc == 0)
|
||||||
{
|
{
|
||||||
ret = inet_aton(argv[1], &addr);
|
ospf->passive_interface_default = OSPF_IF_PASSIVE;
|
||||||
if (!ret)
|
ospf_passive_interface_default (ospf);
|
||||||
{
|
|
||||||
vty_out (vty, "Please specify interface address by A.B.C.D%s",
|
|
||||||
VTY_NEWLINE);
|
|
||||||
return CMD_WARNING;
|
|
||||||
}
|
|
||||||
|
|
||||||
params = ospf_get_if_params (ifp, addr);
|
|
||||||
ospf_if_update_params (ifp, addr);
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (argc == 2)
|
||||||
|
{
|
||||||
|
ret = inet_aton(argv[1], &addr);
|
||||||
|
if (!ret)
|
||||||
|
{
|
||||||
|
vty_out (vty, "Please specify interface address by A.B.C.D%s",
|
||||||
|
VTY_NEWLINE);
|
||||||
|
return CMD_WARNING;
|
||||||
|
}
|
||||||
|
|
||||||
SET_IF_PARAM (params, passive_interface);
|
params = ospf_get_if_params (ifp, addr);
|
||||||
params->passive_interface = OSPF_IF_PASSIVE;
|
ospf_if_update_params (ifp, addr);
|
||||||
|
}
|
||||||
|
ospf_passive_interface_update (ospf, ifp, addr, params, OSPF_IF_PASSIVE);
|
||||||
|
}
|
||||||
|
|
||||||
/* XXX We should call ospf_if_set_multicast on exactly those
|
/* XXX We should call ospf_if_set_multicast on exactly those
|
||||||
* interfaces for which the passive property changed. It is too much
|
* interfaces for which the passive property changed. It is too much
|
||||||
* work to determine this set, so we do this for every interface.
|
* work to determine this set, so we do this for every interface.
|
||||||
@ -289,6 +348,7 @@ DEFUN (ospf_passive_interface,
|
|||||||
* record of joined groups to avoid systems calls if the desired
|
* record of joined groups to avoid systems calls if the desired
|
||||||
* memberships match the current memership.
|
* memberships match the current memership.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
for (rn = route_top(IF_OIFS(ifp)); rn; rn = route_next (rn))
|
for (rn = route_top(IF_OIFS(ifp)); rn; rn = route_next (rn))
|
||||||
{
|
{
|
||||||
struct ospf_interface *oi = rn->info;
|
struct ospf_interface *oi = rn->info;
|
||||||
@ -312,6 +372,12 @@ ALIAS (ospf_passive_interface,
|
|||||||
"Suppress routing updates on an interface\n"
|
"Suppress routing updates on an interface\n"
|
||||||
"Interface's name\n")
|
"Interface's name\n")
|
||||||
|
|
||||||
|
ALIAS (ospf_passive_interface,
|
||||||
|
ospf_passive_interface_default_cmd,
|
||||||
|
"passive-interface default",
|
||||||
|
"Suppress routing updates on an interface\n"
|
||||||
|
"Suppress routing updates on interfaces by default\n")
|
||||||
|
|
||||||
DEFUN (no_ospf_passive_interface,
|
DEFUN (no_ospf_passive_interface,
|
||||||
no_ospf_passive_interface_addr_cmd,
|
no_ospf_passive_interface_addr_cmd,
|
||||||
"no passive-interface IFNAME A.B.C.D",
|
"no passive-interface IFNAME A.B.C.D",
|
||||||
@ -324,33 +390,34 @@ DEFUN (no_ospf_passive_interface,
|
|||||||
struct ospf_if_params *params;
|
struct ospf_if_params *params;
|
||||||
int ret;
|
int ret;
|
||||||
struct route_node *rn;
|
struct route_node *rn;
|
||||||
|
struct ospf *ospf = vty->index;
|
||||||
|
|
||||||
ifp = if_get_by_name (argv[0]);
|
ifp = if_get_by_name (argv[0]);
|
||||||
|
|
||||||
params = IF_DEF_PARAMS (ifp);
|
params = IF_DEF_PARAMS (ifp);
|
||||||
|
|
||||||
if (argc == 2)
|
if (argc == 0)
|
||||||
{
|
{
|
||||||
ret = inet_aton(argv[1], &addr);
|
ospf->passive_interface_default = OSPF_IF_ACTIVE;
|
||||||
if (!ret)
|
ospf_passive_interface_default (ospf);
|
||||||
{
|
|
||||||
vty_out (vty, "Please specify interface address by A.B.C.D%s",
|
|
||||||
VTY_NEWLINE);
|
|
||||||
return CMD_WARNING;
|
|
||||||
}
|
|
||||||
|
|
||||||
params = ospf_lookup_if_params (ifp, addr);
|
|
||||||
if (params == NULL)
|
|
||||||
return CMD_SUCCESS;
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
UNSET_IF_PARAM (params, passive_interface);
|
|
||||||
params->passive_interface = OSPF_IF_ACTIVE;
|
|
||||||
|
|
||||||
if (params != IF_DEF_PARAMS (ifp))
|
|
||||||
{
|
{
|
||||||
ospf_free_if_params (ifp, addr);
|
if (argc == 2)
|
||||||
ospf_if_update_params (ifp, addr);
|
{
|
||||||
|
ret = inet_aton(argv[1], &addr);
|
||||||
|
if (!ret)
|
||||||
|
{
|
||||||
|
vty_out (vty, "Please specify interface address by A.B.C.D%s",
|
||||||
|
VTY_NEWLINE);
|
||||||
|
return CMD_WARNING;
|
||||||
|
}
|
||||||
|
|
||||||
|
params = ospf_lookup_if_params (ifp, addr);
|
||||||
|
if (params == NULL)
|
||||||
|
return CMD_SUCCESS;
|
||||||
|
}
|
||||||
|
ospf_passive_interface_update (ospf, ifp, addr, params, OSPF_IF_ACTIVE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* XXX We should call ospf_if_set_multicast on exactly those
|
/* XXX We should call ospf_if_set_multicast on exactly those
|
||||||
@ -378,6 +445,13 @@ ALIAS (no_ospf_passive_interface,
|
|||||||
"Allow routing updates on an interface\n"
|
"Allow routing updates on an interface\n"
|
||||||
"Interface's name\n")
|
"Interface's name\n")
|
||||||
|
|
||||||
|
ALIAS (no_ospf_passive_interface,
|
||||||
|
no_ospf_passive_interface_default_cmd,
|
||||||
|
"no passive-interface default",
|
||||||
|
NO_STR
|
||||||
|
"Allow routing updates on an interface\n"
|
||||||
|
"Allow routing updates on interfaces by default\n")
|
||||||
|
|
||||||
DEFUN (ospf_network_area,
|
DEFUN (ospf_network_area,
|
||||||
ospf_network_area_cmd,
|
ospf_network_area_cmd,
|
||||||
"network A.B.C.D/M area (A.B.C.D|<0-4294967295>)",
|
"network A.B.C.D/M area (A.B.C.D|<0-4294967295>)",
|
||||||
@ -2883,14 +2957,14 @@ show_ip_ospf_interface_sub (struct vty *vty, struct ospf *ospf,
|
|||||||
OSPF_IF_PARAM (oi, retransmit_interval),
|
OSPF_IF_PARAM (oi, retransmit_interval),
|
||||||
VTY_NEWLINE);
|
VTY_NEWLINE);
|
||||||
|
|
||||||
if (OSPF_IF_PARAM (oi, passive_interface) == OSPF_IF_ACTIVE)
|
if (OSPF_IF_PASSIVE_STATUS (oi) == OSPF_IF_ACTIVE)
|
||||||
{
|
{
|
||||||
char timebuf[OSPF_TIME_DUMP_SIZE];
|
char timebuf[OSPF_TIME_DUMP_SIZE];
|
||||||
vty_out (vty, " Hello due in %s%s",
|
vty_out (vty, " Hello due in %s%s",
|
||||||
ospf_timer_dump (oi->t_hello, timebuf, sizeof(timebuf)),
|
ospf_timer_dump (oi->t_hello, timebuf, sizeof(timebuf)),
|
||||||
VTY_NEWLINE);
|
VTY_NEWLINE);
|
||||||
}
|
}
|
||||||
else /* OSPF_IF_PASSIVE is set */
|
else /* passive-interface is set */
|
||||||
vty_out (vty, " No Hellos (Passive interface)%s", VTY_NEWLINE);
|
vty_out (vty, " No Hellos (Passive interface)%s", VTY_NEWLINE);
|
||||||
|
|
||||||
vty_out (vty, " Neighbor Count is %d, Adjacent neighbor count is %d%s",
|
vty_out (vty, " Neighbor Count is %d, Adjacent neighbor count is %d%s",
|
||||||
@ -7868,17 +7942,36 @@ ospf_config_write (struct vty *vty)
|
|||||||
config_write_ospf_redistribute (vty, ospf);
|
config_write_ospf_redistribute (vty, ospf);
|
||||||
|
|
||||||
/* passive-interface print. */
|
/* passive-interface print. */
|
||||||
|
if (ospf->passive_interface_default == OSPF_IF_PASSIVE)
|
||||||
|
vty_out (vty, " passive-interface default%s", VTY_NEWLINE);
|
||||||
|
|
||||||
for (ALL_LIST_ELEMENTS_RO (om->iflist, node, ifp))
|
for (ALL_LIST_ELEMENTS_RO (om->iflist, node, ifp))
|
||||||
if (IF_DEF_PARAMS (ifp)->passive_interface == OSPF_IF_PASSIVE)
|
if (OSPF_IF_PARAM_CONFIGURED (IF_DEF_PARAMS (ifp), passive_interface)
|
||||||
vty_out (vty, " passive-interface %s%s",
|
&& IF_DEF_PARAMS (ifp)->passive_interface !=
|
||||||
ifp->name, VTY_NEWLINE);
|
ospf->passive_interface_default)
|
||||||
|
{
|
||||||
|
vty_out (vty, " %spassive-interface %s%s",
|
||||||
|
IF_DEF_PARAMS (ifp)->passive_interface ? "" : "no ",
|
||||||
|
ifp->name, VTY_NEWLINE);
|
||||||
|
}
|
||||||
for (ALL_LIST_ELEMENTS_RO (ospf->oiflist, node, oi))
|
for (ALL_LIST_ELEMENTS_RO (ospf->oiflist, node, oi))
|
||||||
if (OSPF_IF_PARAM_CONFIGURED (oi->params, passive_interface) &&
|
{
|
||||||
oi->params->passive_interface == OSPF_IF_PASSIVE)
|
if (!OSPF_IF_PARAM_CONFIGURED (oi->params, passive_interface))
|
||||||
vty_out (vty, " passive-interface %s %s%s",
|
continue;
|
||||||
|
if (OSPF_IF_PARAM_CONFIGURED (IF_DEF_PARAMS (oi->ifp),
|
||||||
|
passive_interface))
|
||||||
|
{
|
||||||
|
if (oi->params->passive_interface == IF_DEF_PARAMS (oi->ifp)->passive_interface)
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
else if (oi->params->passive_interface == ospf->passive_interface_default)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
vty_out (vty, " %spassive-interface %s %s%s",
|
||||||
|
oi->params->passive_interface ? "" : "no ",
|
||||||
oi->ifp->name,
|
oi->ifp->name,
|
||||||
inet_ntoa (oi->address->u.prefix4), VTY_NEWLINE);
|
inet_ntoa (oi->address->u.prefix4), VTY_NEWLINE);
|
||||||
|
}
|
||||||
|
|
||||||
/* Network area print. */
|
/* Network area print. */
|
||||||
config_write_network_area (vty, ospf);
|
config_write_network_area (vty, ospf);
|
||||||
@ -8199,8 +8292,10 @@ ospf_vty_init (void)
|
|||||||
/* "passive-interface" commands. */
|
/* "passive-interface" commands. */
|
||||||
install_element (OSPF_NODE, &ospf_passive_interface_addr_cmd);
|
install_element (OSPF_NODE, &ospf_passive_interface_addr_cmd);
|
||||||
install_element (OSPF_NODE, &ospf_passive_interface_cmd);
|
install_element (OSPF_NODE, &ospf_passive_interface_cmd);
|
||||||
|
install_element (OSPF_NODE, &ospf_passive_interface_default_cmd);
|
||||||
install_element (OSPF_NODE, &no_ospf_passive_interface_addr_cmd);
|
install_element (OSPF_NODE, &no_ospf_passive_interface_addr_cmd);
|
||||||
install_element (OSPF_NODE, &no_ospf_passive_interface_cmd);
|
install_element (OSPF_NODE, &no_ospf_passive_interface_cmd);
|
||||||
|
install_element (OSPF_NODE, &no_ospf_passive_interface_default_cmd);
|
||||||
|
|
||||||
/* "ospf abr-type" commands. */
|
/* "ospf abr-type" commands. */
|
||||||
install_element (OSPF_NODE, &ospf_abr_type_cmd);
|
install_element (OSPF_NODE, &ospf_abr_type_cmd);
|
||||||
|
@ -167,6 +167,8 @@ ospf_new (void)
|
|||||||
|
|
||||||
new->default_originate = DEFAULT_ORIGINATE_NONE;
|
new->default_originate = DEFAULT_ORIGINATE_NONE;
|
||||||
|
|
||||||
|
new->passive_interface_default = OSPF_IF_ACTIVE;
|
||||||
|
|
||||||
new->new_external_route = route_table_init ();
|
new->new_external_route = route_table_init ();
|
||||||
new->old_external_route = route_table_init ();
|
new->old_external_route = route_table_init ();
|
||||||
new->external_lsas = route_table_init ();
|
new->external_lsas = route_table_init ();
|
||||||
|
@ -216,6 +216,7 @@ struct ospf
|
|||||||
struct ospf_area *backbone; /* Pointer to the Backbone Area. */
|
struct ospf_area *backbone; /* Pointer to the Backbone Area. */
|
||||||
|
|
||||||
struct list *oiflist; /* ospf interfaces */
|
struct list *oiflist; /* ospf interfaces */
|
||||||
|
u_char passive_interface_default; /* passive-interface default */
|
||||||
|
|
||||||
/* LSDB of AS-external-LSAs. */
|
/* LSDB of AS-external-LSAs. */
|
||||||
struct ospf_lsdb *lsdb;
|
struct ospf_lsdb *lsdb;
|
||||||
|
Loading…
Reference in New Issue
Block a user