diff options
| author | Philippe Guibert <philippe.guibert@6wind.com> | 2019-02-11 17:42:50 +0100 |
|---|---|---|
| committer | Philippe Guibert <philippe.guibert@6wind.com> | 2019-06-12 14:10:28 +0200 |
| commit | a41c4e1b1f577443ad26222704a69649c280cd9e (patch) | |
| tree | 2d01484bb959675b20c1596be1c1f4e28ddaf403 /ospfd/ospf_interface.c | |
| parent | da85f5e03899ee53e235ef5eb6cdacc1ae85de86 (diff) | |
*: change interface structure, from vrf_id to vrf
Field vrf_id is replaced by the pointer of the struct vrf *.
For that all other code referencing to (interface)->vrf_id is replaced.
This work should not change the behaviour.
It is just a continuation work toward having an interface API handling
vrf pointer only.
some new generic functions are created in vrf:
vrf_to_id, vrf_to_name,
a zebra function is also created:
zvrf_info_lookup
an ospf function is also created:
ospf_lookup_by_vrf
it is to be noted that now that interface has a vrf pointer, some more
optimisations could be thought through all the rest of the code. as
example, many structure store the vrf_id. those structures could get
the exact vrf structure if inherited from an interface vrf context.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to 'ospfd/ospf_interface.c')
| -rw-r--r-- | ospfd/ospf_interface.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ospfd/ospf_interface.c b/ospfd/ospf_interface.c index 4075f32092..6516129c5d 100644 --- a/ospfd/ospf_interface.c +++ b/ospfd/ospf_interface.c @@ -349,8 +349,8 @@ void ospf_if_free(struct ospf_interface *oi) if (IS_DEBUG_OSPF_EVENT) zlog_debug("%s: ospf interface %s vrf %s id %u deleted", __PRETTY_FUNCTION__, oi->ifp->name, - ospf_vrf_id_to_name(oi->ifp->vrf_id), - oi->ifp->vrf_id); + vrf_to_name(oi->ifp->vrf), + vrf_to_id(oi->ifp->vrf)); ospf_delete_from_if(oi->ifp, oi); |
