diff options
author | FUJITA Tomonori <fujita.tomonori@gmail.com> | 2019-10-06 21:58:18 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@gmail.com> | 2019-10-22 21:58:59 +0900 |
commit | 5c5deac88845f71ca75d08a6f43574702a057853 (patch) | |
tree | 806b088ab8ea67c319ef696c52099d8ce1445800 /pkg | |
parent | a1a523a1b3323685e97cb88691fcd76c39156195 (diff) |
table: use net.IPNet for roa instead of homegrown IPPrefix structure
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/server/grpc_server.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pkg/server/grpc_server.go b/pkg/server/grpc_server.go index 3c7527b2..215a1866 100644 --- a/pkg/server/grpc_server.go +++ b/pkg/server/grpc_server.go @@ -1584,11 +1584,12 @@ func newRoaListFromTableStructList(origin []*table.ROA) []*api.Roa { for _, r := range origin { host, portStr, _ := net.SplitHostPort(r.Src) port, _ := strconv.ParseUint(portStr, 10, 32) + ones, _ := r.Network.Mask.Size() l = append(l, &api.Roa{ As: r.AS, Maxlen: uint32(r.MaxLen), - Prefixlen: uint32(r.Prefix.Length), - Prefix: r.Prefix.Prefix.String(), + Prefixlen: uint32(ones), + Prefix: r.Network.IP.String(), Conf: &api.RPKIConf{ Address: host, RemotePort: uint32(port), |