Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
.idea
*.mmdb
**/venv/*
**/__pycache__/*
**/__pycache__/*
# zannotate binary
zannotate
# IDE Files
**/.DS_Store
8 changes: 4 additions & 4 deletions cmd/mrt2json/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
"fmt"
"os"

"github.com/osrg/gobgp/v4/pkg/packet/bgp"
"github.com/osrg/gobgp/v4/pkg/packet/mrt"
"github.com/osrg/gobgp/v3/pkg/packet/bgp"
"github.com/osrg/gobgp/v3/pkg/packet/mrt"
log "github.com/sirupsen/logrus"

"github.com/zmap/zannotate/zmrt"
Expand Down Expand Up @@ -61,7 +61,7 @@ type RawRib struct {
SequenceNumber uint32 `json:"sequence_number"`
Prefix bgp.AddrPrefixInterface `json:"prefix"`
Entries []*RawRibEntry `json:"entries"`
RouteFamily bgp.Family `json:"route_family"`
RouteFamily bgp.RouteFamily `json:"route_family"`
}

func raw(conf *MRT2JsonGlobalConf, f *os.File) {
Expand Down Expand Up @@ -102,7 +102,7 @@ func raw(conf *MRT2JsonGlobalConf, f *os.File) {
var out RawRib
out.SequenceNumber = rib.SequenceNumber
out.Prefix = rib.Prefix
out.RouteFamily = rib.Family
out.RouteFamily = rib.RouteFamily
for _, entry := range rib.Entries {
var ribOut RawRibEntry
ribOut.PeerIndex = entry.PeerIndex
Expand Down
8 changes: 3 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
module github.com/zmap/zannotate

go 1.23.0

toolchain go1.24.4
go 1.24.0

require (
github.com/json-iterator/go v1.1.12
github.com/oschwald/geoip2-golang v1.13.0
github.com/osrg/gobgp/v4 v4.0.0-20250606141535-bfa40aa58ac3
github.com/osrg/gobgp/v3 v3.37.0
github.com/sirupsen/logrus v1.9.3
github.com/zmap/go-iptree v0.0.0-20210731043055-d4e632617837
gotest.tools/v3 v3.5.2
Expand All @@ -19,5 +17,5 @@ require (
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/oschwald/maxminddb-golang v1.13.1 // indirect
golang.org/x/sys v0.33.0 // indirect
golang.org/x/sys v0.36.0 // indirect
)
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ github.com/oschwald/geoip2-golang v1.13.0 h1:Q44/Ldc703pasJeP5V9+aFSZFmBN7DKHbNs
github.com/oschwald/geoip2-golang v1.13.0/go.mod h1:P9zG+54KPEFOliZ29i7SeYZ/GM6tfEL+rgSn03hYuUo=
github.com/oschwald/maxminddb-golang v1.13.1 h1:G3wwjdN9JmIK2o/ermkHM+98oX5fS+k5MbwsmL4MRQE=
github.com/oschwald/maxminddb-golang v1.13.1/go.mod h1:K4pgV9N/GcK694KSTmVSDTODk4IsCNThNdTmnaBZ/F8=
github.com/osrg/gobgp/v4 v4.0.0-20250606141535-bfa40aa58ac3 h1:Iwv8PJDWY5xiX/r1TX/6E2QSi/Fj/6EScpgkOZ6mOp8=
github.com/osrg/gobgp/v4 v4.0.0-20250606141535-bfa40aa58ac3/go.mod h1:2IkfJb7PykGZnbXRDCnC6yALE1aESyX75Ab3uIEbgkI=
github.com/osrg/gobgp/v3 v3.37.0 h1:+ObuOdvj7G7nxrT0fKFta+EAupdWf/q1WzbXydr8IOY=
github.com/osrg/gobgp/v3 v3.37.0/go.mod h1:kVHVFy1/fyZHJ8P32+ctvPeJogn9qKwa1YCeMRXXrP0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
Expand All @@ -34,8 +34,8 @@ github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8
github.com/zmap/go-iptree v0.0.0-20210731043055-d4e632617837 h1:DjHnADS2r2zynZ3WkCFAQ+PNYngMSNceRROi0pO6c3M=
github.com/zmap/go-iptree v0.0.0-20210731043055-d4e632617837/go.mod h1:9vp0bxqozzQwcjBwenEXfKVq8+mYbwHkQ1NF9Ap0DMw=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw=
golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
golang.org/x/sys v0.36.0 h1:KVRy2GtZBrk1cBYA7MKu5bEZFxQk4NIDV6RLVcC8o0k=
golang.org/x/sys v0.36.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
Expand Down
4 changes: 2 additions & 2 deletions zmrt/mrt.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (
"net"
"time"

"github.com/osrg/gobgp/v4/pkg/packet/bgp"
"github.com/osrg/gobgp/v4/pkg/packet/mrt"
"github.com/osrg/gobgp/v3/pkg/packet/bgp"
"github.com/osrg/gobgp/v3/pkg/packet/mrt"
"github.com/sirupsen/logrus"
)

Expand Down
2 changes: 1 addition & 1 deletion zrouting/routinglookup.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"io"
"net"

"github.com/osrg/gobgp/v4/pkg/packet/bgp"
"github.com/osrg/gobgp/v3/pkg/packet/bgp"
"github.com/zmap/go-iptree/iptree"

"github.com/zmap/zannotate/zmrt"
Expand Down