diff --git a/cmd/ris/risserver/server.go b/cmd/ris/risserver/server.go index 1efaf04eaf4d2103be52bc6e5ffcaab02f7f9099..cfbc1826a597cbd733e0438f9dc7709ac215a7e5 100644 --- a/cmd/ris/risserver/server.go +++ b/cmd/ris/risserver/server.go @@ -87,7 +87,7 @@ func (s *Server) LPM(ctx context.Context, req *pb.LPMRequest) (*pb.LPMResponse, return nil, err } - routes := rib.LPM(bnet.NewPrefixFromProtoPrefix(*req.Pfx)) + routes := rib.LPM(bnet.NewPrefixFromProtoPrefix(req.Pfx)) res := &pb.LPMResponse{ Routes: make([]*routeapi.Route, 0, len(routes)), } @@ -105,7 +105,7 @@ func (s *Server) Get(ctx context.Context, req *pb.GetRequest) (*pb.GetResponse, return nil, err } - route := rib.Get(bnet.NewPrefixFromProtoPrefix(*req.Pfx)) + route := rib.Get(bnet.NewPrefixFromProtoPrefix(req.Pfx)) if route == nil { return &pb.GetResponse{ Routes: make([]*routeapi.Route, 0, 0), @@ -126,7 +126,7 @@ func (s *Server) GetLonger(ctx context.Context, req *pb.GetLongerRequest) (*pb.G return nil, err } - routes := rib.GetLonger(bnet.NewPrefixFromProtoPrefix(*req.Pfx)) + routes := rib.GetLonger(bnet.NewPrefixFromProtoPrefix(req.Pfx)) res := &pb.GetLongerResponse{ Routes: make([]*routeapi.Route, 0, len(routes)), } diff --git a/protocols/bgp/server/bgp_api.go b/protocols/bgp/server/bgp_api.go index 5546abf94dc98ab546e736457ee50d6b67305c99..242c7fb02f76925232933705ab9fd7f1d62e4cd8 100644 --- a/protocols/bgp/server/bgp_api.go +++ b/protocols/bgp/server/bgp_api.go @@ -28,7 +28,7 @@ func (s *BGPAPIServer) ListSessions(ctx context.Context, in *api.ListSessionsReq // DumpRIBIn dumps the RIB in of a peer for a given AFI/SAFI func (s *BGPAPIServer) DumpRIBIn(in *api.DumpRIBRequest, stream api.BgpService_DumpRIBInServer) error { - r := s.srv.GetRIBIn(bnet.IPFromProtoIP(*in.Peer), uint16(in.Afi), uint8(in.Safi)) + r := s.srv.GetRIBIn(bnet.IPFromProtoIP(in.Peer), uint16(in.Afi), uint8(in.Safi)) if r == nil { return fmt.Errorf("Unable to get AdjRIBIn") } @@ -46,7 +46,7 @@ func (s *BGPAPIServer) DumpRIBIn(in *api.DumpRIBRequest, stream api.BgpService_D // DumpRIBOut dumps the RIB out of a peer for a given AFI/SAFI func (s *BGPAPIServer) DumpRIBOut(in *api.DumpRIBRequest, stream api.BgpService_DumpRIBOutServer) error { - r := s.srv.GetRIBOut(bnet.IPFromProtoIP(*in.Peer), uint16(in.Afi), uint8(in.Safi)) + r := s.srv.GetRIBOut(bnet.IPFromProtoIP(in.Peer), uint16(in.Afi), uint8(in.Safi)) if r == nil { return fmt.Errorf("Unable to get AdjRIBOut") } diff --git a/route/bgp_path.go b/route/bgp_path.go index 88d5b0e5ee8ed93077aad8cd211245fad3c1b282..378abebcb89c24ac3eaef2e267fe65470b4413f0 100644 --- a/route/bgp_path.go +++ b/route/bgp_path.go @@ -111,14 +111,14 @@ func (b *BGPPath) ToProto() *api.BGPPath { func BGPPathFromProtoBGPPath(pb *api.BGPPath, dedup bool) *BGPPath { p := &BGPPath{ BGPPathA: &BGPPathA{ - NextHop: bnet.IPFromProtoIP(*pb.NextHop), + NextHop: bnet.IPFromProtoIP(pb.NextHop), LocalPref: pb.LocalPref, OriginatorID: pb.OriginatorId, Origin: uint8(pb.Origin), MED: pb.Med, EBGP: pb.Ebgp, BGPIdentifier: pb.BgpIdentifier, - Source: bnet.IPFromProtoIP(*pb.Source), + Source: bnet.IPFromProtoIP(pb.Source), }, PathIdentifier: pb.PathIdentifier, ASPath: types.ASPathFromProtoASPath(pb.AsPath), diff --git a/route/route.go b/route/route.go index 9b523c7d37686b10026c2d1b0d098d700113cec8..fd92772e652f2986e73a25366493331488663652 100644 --- a/route/route.go +++ b/route/route.go @@ -269,7 +269,7 @@ func (r *Route) ToProto() *api.Route { // RouteFromProtoRoute converts a proto Route to a Route func RouteFromProtoRoute(ar *api.Route, dedup bool) *Route { r := &Route{ - pfx: net.NewPrefixFromProtoPrefix(*ar.Pfx), + pfx: net.NewPrefixFromProtoPrefix(ar.Pfx), paths: make([]*Path, 0, len(ar.Paths)), }