]> git.puffer.fish Git - mirror/frr.git/commit
vrf: return vrf implementation for default vrf
authorThibaut Collet <thibaut.collet@6wind.com>
Thu, 30 Aug 2018 09:42:55 +0000 (11:42 +0200)
committerThibaut Collet <thibaut.collet@6wind.com>
Thu, 30 Aug 2018 12:37:55 +0000 (14:37 +0200)
commit20c87e98d8399c322f3f8da9d34ca19fd4ca1865
tree38e3c8bcb5ccd319e32375339c45827613aff6dd
parentf177317a20ff417c2dc9d719f2e1135d81ff96f8
vrf: return vrf implementation for default vrf

To correct potential crash with netns implementation of vrf (see next
commit) it is necessary to allow any daemons to know the vrf
implementation whatever the vrf.
With current implementation the daemons do not know the vrf
implementation for the default vrf. For this vrf the returned vrf
implementation is always vrf-lite.
To solve this issue a netns name is set to the default vrf to just test
is presence to know the used implementation.

For zebra a netns name (if needed) is set in the vrf_init function just
before enabling the vrf. So this information is propagated to the other
daemons thanks the zapi message called when the vrf is enable at zebra
layer and override the default configuration (vrf-lite) of the daemon.

Signed-off-by: Thibaut Collet <thibaut.collet@6wind.com>
lib/vrf.c