diff options
Diffstat (limited to 'api/util.go')
-rw-r--r-- | api/util.go | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/api/util.go b/api/util.go index 9b7a389e..b77b35ec 100644 --- a/api/util.go +++ b/api/util.go @@ -20,7 +20,6 @@ import ( "net" "time" - "github.com/osrg/gobgp/config" "github.com/osrg/gobgp/packet/bgp" ) @@ -108,22 +107,3 @@ func (p *Path) GetNativePathAttributes() ([]bgp.PathAttributeInterface, error) { } return UnmarshalPathAttributes(p.AnyPattrs) } - -func extractFamilyFromConfigAfiSafi(c *config.AfiSafi) uint32 { - if c == nil { - return 0 - } - // If address family value is already stored in AfiSafiState structure, - // we prefer to use this value. - if c.State.Family != 0 { - return uint32(c.State.Family) - } - // In case that Neighbor structure came from CLI or gRPC, address family - // value in AfiSafiState structure can be omitted. - // Here extracts value from AfiSafiName field in AfiSafiConfig structure. - if rf, err := bgp.GetRouteFamily(string(c.Config.AfiSafiName)); err == nil { - return uint32(rf) - } - // Ignores invalid address family name - return 0 -} |