Skip to content

Commit a28d710

Browse files
committed
use netbase/nft
1 parent 6f016df commit a28d710

File tree

4 files changed

+5
-25
lines changed

4 files changed

+5
-25
lines changed

cmds/modules/netlightd/main.go

+2-5
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ import (
1010

1111
"github.com/oasisprotocol/curve25519-voi/primitives/x25519"
1212
"github.com/pkg/errors"
13+
"github.com/threefoldtech/zosbase/pkg/netbase/nft"
1314
"github.com/threefoldtech/zosbase/pkg/netlight"
1415
"github.com/threefoldtech/zosbase/pkg/netlight/bridge"
1516
"github.com/threefoldtech/zosbase/pkg/netlight/ifaceutil"
16-
"github.com/threefoldtech/zosbase/pkg/netlight/nft"
1717
"github.com/threefoldtech/zosbase/pkg/netlight/public"
1818
"github.com/threefoldtech/zosbase/pkg/netlight/resource"
1919
"github.com/urfave/cli/v2"
@@ -34,9 +34,6 @@ const (
3434
//go:embed nft/rules.nft
3535
var nftRules embed.FS
3636

37-
//go:embed nft/lansecurity.tmpl
38-
var securityRules string
39-
4037
// Module is entry point for module
4138
var Module cli.Command = cli.Command{
4239
Name: "netlightd",
@@ -115,7 +112,7 @@ func action(cli *cli.Context) error {
115112
}
116113
rules.Close()
117114

118-
if err := nft.DropTrafficToLAN(securityRules); err != nil {
115+
if err := nft.DropTrafficToLAN(""); err != nil {
119116
return fmt.Errorf("failed to drop traffic to lan: %w", err)
120117
}
121118

cmds/modules/netlightd/nft/lansecurity.tmpl

-17
This file was deleted.

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ require (
4040
github.com/threefoldtech/tfchain/clients/tfchain-client-go v0.0.0-20241127100051-77e684bcb1b2
4141
github.com/threefoldtech/tfgrid-sdk-go/rmb-sdk-go v0.16.1-0.20241229121208-76ac3fea5e67
4242
github.com/threefoldtech/zbus v1.0.1
43-
github.com/threefoldtech/zosbase v0.1.3-0.20250304112457-4fe70d8d47ff
43+
github.com/threefoldtech/zosbase v0.1.3-0.20250310155434-097d1a0f59f3
4444
github.com/urfave/cli/v2 v2.17.2-0.20221006022127-8f469abc00aa
4545
github.com/vishvananda/netlink v1.1.1-0.20201029203352-d40f9887b852
4646
github.com/vishvananda/netns v0.0.0-20210104183010-2eb08e3e575f // indirect

go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -542,8 +542,8 @@ github.com/threefoldtech/tfgrid-sdk-go/rmb-sdk-go v0.16.1-0.20241229121208-76ac3
542542
github.com/threefoldtech/tfgrid-sdk-go/rmb-sdk-go v0.16.1-0.20241229121208-76ac3fea5e67/go.mod h1:93SROfr+QjgaJ5/jIWtIpLkhaD8Pv8WbdfwvwMNG2p4=
543543
github.com/threefoldtech/zbus v1.0.1 h1:3KaEpyOiDYAw+lrAyoQUGIvY9BcjVRXlQ1beBRqhRNk=
544544
github.com/threefoldtech/zbus v1.0.1/go.mod h1:E/v/xEvG/l6z/Oj0aDkuSUXFm/1RVJkhKBwDTAIdsHo=
545-
github.com/threefoldtech/zosbase v0.1.3-0.20250304112457-4fe70d8d47ff h1:jKXimkoOIOpv+3/VHp5cag7WYAduFcBw6IlX4nMlsqk=
546-
github.com/threefoldtech/zosbase v0.1.3-0.20250304112457-4fe70d8d47ff/go.mod h1:rxc49wA04S4IsBOYe0omVO7nu7GXridueh2PJh34gSo=
545+
github.com/threefoldtech/zosbase v0.1.3-0.20250310155434-097d1a0f59f3 h1:/qsDPVSzHUcr98btXPoqL7Sl9eqYhgD1wZLavwEYkrw=
546+
github.com/threefoldtech/zosbase v0.1.3-0.20250310155434-097d1a0f59f3/go.mod h1:rxc49wA04S4IsBOYe0omVO7nu7GXridueh2PJh34gSo=
547547
github.com/tinylib/msgp v1.1.5 h1:2gXmtWueD2HefZHQe1QOy9HVzmFrLOVvsXwXBQ0ayy0=
548548
github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg=
549549
github.com/tklauser/go-sysconf v0.3.11 h1:89WgdJhk5SNwJfu+GKyYveZ4IaJ7xAkecBo+KdJV0CM=

0 commit comments

Comments
 (0)