diff options
| author | Kaushik <kaushik@niralnetworks.com> | 2020-09-01 01:31:49 -0700 |
|---|---|---|
| committer | Kaushik <kaushik@niralnetworks.com> | 2020-09-01 03:02:46 -0700 |
| commit | c5d28568c6b71e16fefb3a409159e8fc9742e3f0 (patch) | |
| tree | 9aa9c4b0944e5f6ed9740c184ca81141edf28f36 /ospf6d/ospf6_interface.c | |
| parent | ddffdcf728280246e4ba8ba645d3c1b98763c4e5 (diff) | |
ospf6d : Preparing for ospf6d VRF support.
1. Removed the VRF_DEFAULT dependency from ospf6d.
2. The dependency on show command still exist
will be fixed when the ospf6 master is available.
Co-authored-by: Harios <hari@niralnetworks.com>
Signed-off-by: Kaushik <kaushik@niralnetworks.com>
Diffstat (limited to 'ospf6d/ospf6_interface.c')
| -rw-r--r-- | ospf6d/ospf6_interface.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/ospf6d/ospf6_interface.c b/ospf6d/ospf6_interface.c index d10329a93b..3985b08620 100644 --- a/ospf6d/ospf6_interface.c +++ b/ospf6d/ospf6_interface.c @@ -56,12 +56,13 @@ const char *const ospf6_interface_state_str[] = { "None", "Down", "Loopback", "Waiting", "PointToPoint", "DROther", "BDR", "DR", NULL}; -struct ospf6_interface *ospf6_interface_lookup_by_ifindex(ifindex_t ifindex) +struct ospf6_interface *ospf6_interface_lookup_by_ifindex(ifindex_t ifindex, + vrf_id_t vrf_id) { struct ospf6_interface *oi; struct interface *ifp; - ifp = if_lookup_by_index(ifindex, VRF_DEFAULT); + ifp = if_lookup_by_index(ifindex, vrf_id); if (ifp == NULL) return (struct ospf6_interface *)NULL; @@ -1022,7 +1023,7 @@ DEFUN (show_ipv6_ospf6_interface, return CMD_SUCCESS; } -static int ospf6_interface_show_traffic(struct vty *vty, uint32_t vrf_id, +static int ospf6_interface_show_traffic(struct vty *vty, struct interface *intf_ifp, int display_once) { @@ -1030,7 +1031,7 @@ static int ospf6_interface_show_traffic(struct vty *vty, uint32_t vrf_id, struct vrf *vrf = NULL; struct ospf6_interface *oi = NULL; - vrf = vrf_lookup_by_id(vrf_id); + vrf = vrf_lookup_by_id(intf_ifp->vrf_id); if (!display_once) { vty_out(vty, "\n"); @@ -1105,7 +1106,7 @@ DEFUN (show_ipv6_ospf6_interface_traffic, } } - ospf6_interface_show_traffic(vty, VRF_DEFAULT, ifp, display_once); + ospf6_interface_show_traffic(vty, ifp, display_once); return CMD_SUCCESS; |
