]> git.puffer.fish Git - mirror/frr.git/commit
bgpd: add utility to check if a vrf is active
authorPat Ruddy <pat@voltanet.io>
Fri, 18 Sep 2020 09:12:08 +0000 (10:12 +0100)
committerPat Ruddy <pat@voltanet.io>
Tue, 2 Feb 2021 09:37:04 +0000 (09:37 +0000)
commit1e500ec09ff8c94fea6d5da76acd6bdbf56f0418
tree13d46f7000bdbebeaca2d1d2dac505132d0c4ced
parent8e0373314c7d42f674d47408e4ab71eb6cf48232
bgpd: add utility to check if a vrf is active

From RFC4382:
A VRF is
up(1) when there is at least one interface associated
with the VRF whose ifOperStatus is up(1).  A VRF is
down(2) when:
a. There does not exist at least one interface whose
   ifOperStatus is up(1).
b. There are no interfaces associated with the VRF.

Run through interfaces associated with a vrf and return
true if there is one in the up state.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
bgpd/bgpd.h