summaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/server.go4
-rw-r--r--server/zclient.go2
2 files changed, 3 insertions, 3 deletions
diff --git a/server/server.go b/server/server.go
index 298505f5..2cb0d29e 100644
--- a/server/server.go
+++ b/server/server.go
@@ -956,7 +956,7 @@ func (server *BgpServer) handleModPathRequest(grpcReq *GrpcRequest) []*table.Pat
path = arg.Path
if len(path.Nlri) > 0 {
- nlri = &bgp.NLRInfo{}
+ nlri = &bgp.IPAddrPrefix{}
err := nlri.DecodeFromBytes(path.Nlri)
if err != nil {
result.ResponseErr = err
@@ -1021,7 +1021,7 @@ func (server *BgpServer) handleModPathRequest(grpcReq *GrpcRequest) []*table.Pat
switch rf {
case bgp.RF_IPv4_UC:
- n := nlri.(*bgp.NLRInfo)
+ n := nlri.(*bgp.IPAddrPrefix)
nlri = bgp.NewLabeledVPNIPAddrPrefix(n.Length, n.Prefix.String(), *bgp.NewMPLSLabelStack(), vrf.Rd)
case bgp.RF_IPv6_UC:
n := nlri.(*bgp.IPv6AddrPrefix)
diff --git a/server/zclient.go b/server/zclient.go
index 7a1a2cb5..e1937a6f 100644
--- a/server/zclient.go
+++ b/server/zclient.go
@@ -115,7 +115,7 @@ func createPathFromIPRouteMessage(m *zebra.Message, peerInfo *table.PeerInfo) *t
}).Debugf("create path from ip route message.")
if isV4 {
- nlri = bgp.NewNLRInfo(body.PrefixLength, body.Prefix.String())
+ nlri = bgp.NewIPAddrPrefix(body.PrefixLength, body.Prefix.String())
nexthop := bgp.NewPathAttributeNextHop(body.Nexthops[0].String())
pattr = append(pattr, nexthop)
} else {