diff options
author | Paul Jakma <paul.jakma@sun.com> | 2006-10-22 20:07:53 +0000 |
---|---|---|
committer | Paul Jakma <paul.jakma@sun.com> | 2006-10-22 20:07:53 +0000 |
commit | 7ffa8fa2322fb759cf1f93730cde2cee3d4ad8ee (patch) | |
tree | 2e27d51d171609415026cbc8ce7f2ef7ea4df5e5 /ospfd/ospf_packet.c | |
parent | 6f58544db526b4dfb09d45f8507926b0ae5fe12b (diff) |
[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.
Diffstat (limited to 'ospfd/ospf_packet.c')
-rw-r--r-- | ospfd/ospf_packet.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c index ce90430d..2addc497 100644 --- a/ospfd/ospf_packet.c +++ b/ospfd/ospf_packet.c @@ -762,7 +762,7 @@ ospf_hello (struct ip *iph, struct ospf_header *ospfh, } /* 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]; zlog_debug ("ignoring HELLO from router %s sent to %s, " "received on a passive interface, %s", @@ -2978,7 +2978,7 @@ ospf_poll_send (struct ospf_nbr_nbma *nbr_nbma) assert(oi); /* 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; if (oi->type != OSPF_IFTYPE_NBMA) @@ -3046,7 +3046,7 @@ ospf_hello_send (struct ospf_interface *oi) u_int16_t length = OSPF_HEADER_SIZE; /* 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; op = ospf_packet_new (oi->ifp->mtu); |