diff options
Diffstat (limited to 'internal/pkg/zebra/zapi.go')
-rw-r--r-- | internal/pkg/zebra/zapi.go | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/internal/pkg/zebra/zapi.go b/internal/pkg/zebra/zapi.go index fd308a6d..2094c8f6 100644 --- a/internal/pkg/zebra/zapi.go +++ b/internal/pkg/zebra/zapi.go @@ -1063,7 +1063,7 @@ func NewClient(network, address string, typ ROUTE_TYPE, version uint8, software if ((version == 2 || version == 3) && software != "" && software != "quagga") || (version == 4 && software != "" && software != "frr3") || - (version == 5 && software != "" && software != "frr4" && software != "frr5") || + (version == 5 && software != "" && software != "frr4" && software != "frr5" && software != "cumulus") || (version == 6 && software != "" && software != "frr6" && software != "frr7" && software != "frr7.1") { isAllowableSoftware = false } @@ -1244,6 +1244,12 @@ func (c *Client) SendCommand(command API_TYPE, vrfId uint32, body Body) error { } else { return err } + } else if c.Version == 5 && c.SoftwareName == "cumulus" { + if cumulusCommand, err := cumulusZapi5Command(command, c.SoftwareName, false); err == nil { + command = cumulusCommand + } else { + return err + } } m := &Message{ Header: Header{ @@ -3164,6 +3170,12 @@ func (m *Message) parseFrrZapi5Message(data []byte, software string) error { } else { return err } + } else if software == "cumulus" { + if c, err := cumulusZapi5Command(command, software, true); err == nil { + command = c + } else { + return err + } } switch command { case FRR_ZAPI5_INTERFACE_ADD, FRR_ZAPI5_INTERFACE_DELETE, FRR_ZAPI5_INTERFACE_UP, FRR_ZAPI5_INTERFACE_DOWN: |