Skip to content

Commit b5a47bd

Browse files
committed
fix: the cli needs to support allowed routes semantics
1 parent 9c3983a commit b5a47bd

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

cli/main.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -246,12 +246,12 @@ func run(c *cli.Context) error {
246246
return fmt.Errorf("failed to create handler: %w", err)
247247
}
248248

249-
allPrefixes := []netip.Prefix{
250-
netip.MustParsePrefix("0.0.0.0/0"),
251-
netip.MustParsePrefix("::/0"),
249+
allRoutes := []icx.AllowedRoute{
250+
{Src: netip.MustParsePrefix("0.0.0.0/0"), Dst: netip.MustParsePrefix("0.0.0.0/0")},
251+
{Src: netip.MustParsePrefix("::/0"), Dst: netip.MustParsePrefix("::/0")},
252252
}
253253

254-
if err := h.AddVirtualNetwork(c.Uint("vni"), peerAddr, allPrefixes); err != nil {
254+
if err := h.AddVirtualNetwork(c.Uint("vni"), peerAddr, allRoutes); err != nil {
255255
return fmt.Errorf("failed to add virtual network: %w", err)
256256
}
257257

0 commit comments

Comments
 (0)