diff options
| author | Igor Ryzhov <iryzhov@nfware.com> | 2021-10-22 01:17:40 +0300 |
|---|---|---|
| committer | Igor Ryzhov <iryzhov@nfware.com> | 2021-11-22 20:47:23 +0300 |
| commit | 096f7609f9168ad1a2503acad31d3afc8f00f9e5 (patch) | |
| tree | 7acf9cbf0f944b032da6a796fcf8d7f6a06fe90a /ospf6d/ospf6_interface.c | |
| parent | d32c92a4c0fcee71a8a6d02cb9ff84607cfdcc07 (diff) | |
*: cleanup ifp->vrf_id
Since f60a1188 we store a pointer to the VRF in the interface structure.
There's no need anymore to store a separate vrf_id field.
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'ospf6d/ospf6_interface.c')
| -rw-r--r-- | ospf6d/ospf6_interface.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/ospf6d/ospf6_interface.c b/ospf6d/ospf6_interface.c index e83dc9c21f..487ecc4072 100644 --- a/ospf6d/ospf6_interface.c +++ b/ospf6d/ospf6_interface.c @@ -150,7 +150,7 @@ static uint32_t ospf6_interface_get_cost(struct ospf6_interface *oi) : OSPF6_INTERFACE_BANDWIDTH; } - ospf6 = ospf6_lookup_by_vrf_id(oi->interface->vrf_id); + ospf6 = oi->interface->vrf->info; refbw = ospf6 ? ospf6->ref_bandwidth : OSPF6_REFERENCE_BANDWIDTH; /* A specifed ip ospf cost overrides a calculated one. */ @@ -1361,11 +1361,6 @@ static int ospf6_interface_show_traffic(struct vty *vty, struct ospf6_interface *oi = NULL; json_object *json_interface; - if (intf_ifp) - vrf = vrf_lookup_by_id(intf_ifp->vrf_id); - else - vrf = vrf_lookup_by_id(vrf_id); - if (!display_once && !use_json) { vty_out(vty, "\n"); vty_out(vty, "%-12s%-17s%-17s%-17s%-17s%-17s\n", "Interface", @@ -1379,6 +1374,7 @@ static int ospf6_interface_show_traffic(struct vty *vty, } if (intf_ifp == NULL) { + vrf = vrf_lookup_by_id(vrf_id); FOR_ALL_INTERFACES (vrf, ifp) { if (ifp->info) oi = (struct ospf6_interface *)ifp->info; @@ -1685,7 +1681,7 @@ void ospf6_interface_start(struct ospf6_interface *oi) if (oi->area) return; - ospf6 = ospf6_lookup_by_vrf_id(oi->interface->vrf_id); + ospf6 = oi->interface->vrf->info; if (!ospf6) return; |
