diff options
author | Igor Ryzhov <iryzhov@nfware.com> | 2021-06-04 16:47:32 +0200 |
---|---|---|
committer | Igor Ryzhov <iryzhov@nfware.com> | 2021-06-05 17:25:01 +0200 |
commit | 3eec4ee0773786b7ba366bc7499ed6bbd28fdf79 (patch) | |
tree | f97dc395533728e1885c4fea5b09b44ac9afc646 /ospfd/ospfd.c | |
parent | Merge pull request #8776 from anlancs/fix-ospf-cli-passive-interface (diff) | |
download | frr-3eec4ee0773786b7ba366bc7499ed6bbd28fdf79.tar.xz frr-3eec4ee0773786b7ba366bc7499ed6bbd28fdf79.zip |
ospfd: fix passive interface configuration
Currently, passive interface flag is configured from the router node
using "passive-interface IFNAME". There are multiple problems with this
command:
- it is not in line with all other interface-related commands - other
parameters are configured from the interface node using "ip ospf"
prefix
- it is not in line with OSPFv3 - passive flag is configured from the
interface node using "ipv6 ospf6 passive" command
- most importantly, it doesn't work correctly when the interface is in
a different VRF - when using VRF-lite, it incorrectly changes the
vrf_id of the interface and it becomes desynced with the actual state;
when using netns, it creates a new fake interface and configures it
instead of configuring the necessary interface
To fix all the problems, this commit adds a new command to the interface
configuration node - "ip ospf passive". The purpose of the command is
completely the same, but it works correctly in a multi-VRF environment.
The old command is preserved for the backward compatibility, but the
warning is added that it is deprecated because it doesn't work correctly
with VRFs.
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'ospfd/ospfd.c')
-rw-r--r-- | ospfd/ospfd.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c index 38c0ca2b6..2f088aa81 100644 --- a/ospfd/ospfd.c +++ b/ospfd/ospfd.c @@ -692,7 +692,6 @@ static void ospf_finish_final(struct ospf *ospf) struct route_node *rn; struct ospf_nbr_nbma *nbr_nbma; struct ospf_lsa *lsa; - struct interface *ifp; struct ospf_interface *oi; struct ospf_area *area; struct ospf_vl_data *vl_data; @@ -740,15 +739,6 @@ static void ospf_finish_final(struct ospf *ospf) if (ospf->vrf_id == VRF_DEFAULT) ospf_ldp_sync_gbl_exit(ospf, true); - /* Remove ospf interface config params: only passive-interface */ - FOR_ALL_INTERFACES (vrf, ifp) { - struct ospf_if_params *params; - - params = IF_DEF_PARAMS(ifp); - if (OSPF_IF_PARAM_CONFIGURED(params, passive_interface)) - UNSET_IF_PARAM(params, passive_interface); - } - /* Reset interface. */ for (ALL_LIST_ELEMENTS(ospf->oiflist, node, nnode, oi)) ospf_if_free(oi); |