Skip to content

Commit

Permalink
Merge pull request #661 from squeed/firewall-version
Browse files Browse the repository at this point in the history
 plugins: fix bug where support for CNI version 0.4.0 or 1.0.0 was dropped
  • Loading branch information
dcbw authored Sep 7, 2021
2 parents 8632ace + ba48f8a commit 189d0c0
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 8 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/Microsoft/hcsshim v0.8.20
github.com/alexflint/go-filemutex v1.1.0
github.com/buger/jsonparser v1.1.1
github.com/containernetworking/cni v1.0.0
github.com/containernetworking/cni v1.0.1
github.com/coreos/go-iptables v0.6.0
github.com/coreos/go-systemd/v22 v22.3.2
github.com/d2g/dhcp4 v0.0.0-20170904100407-a1d1b6c41b1c
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,8 @@ github.com/containernetworking/cni v0.8.0/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ
github.com/containernetworking/cni v0.8.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY=
github.com/containernetworking/cni v1.0.0 h1:9VJe1a5uKtdeJIHC/UvbTweracOh6GafT0nfbEGVcQ0=
github.com/containernetworking/cni v1.0.0/go.mod h1:AKuhXbN5EzmD4yTNtfSsX3tPcmtrBI6QcRV0NiNt15Y=
github.com/containernetworking/cni v1.0.1 h1:9OIL/sZmMYDBe+G8svzILAlulUpaDTUjeAbtH/JNLBo=
github.com/containernetworking/cni v1.0.1/go.mod h1:AKuhXbN5EzmD4yTNtfSsX3tPcmtrBI6QcRV0NiNt15Y=
github.com/containernetworking/plugins v0.8.6/go.mod h1:qnw5mN19D8fIwkqW7oHHYDHVlzhJpcY6TQxn/fUyDDM=
github.com/containernetworking/plugins v0.9.1/go.mod h1:xP/idU2ldlzN6m4p5LmGiwRDjeJr6FLK6vuiUwoH7P8=
github.com/containers/ocicrypt v1.0.1/go.mod h1:MeJDzk1RJHv89LjsH0Sp5KTY3ZYkjXO/C+bKAeWFIrc=
Expand Down
2 changes: 1 addition & 1 deletion plugins/main/windows/win-bridge/win-bridge_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,5 +215,5 @@ func cmdCheck(_ *skel.CmdArgs) error {
}

func main() {
skel.PluginMain(cmdAdd, cmdCheck, cmdDel, version.PluginSupports("0.1.0", "0.2.0", "0.3.0"), bv.BuildString("win-bridge"))
skel.PluginMain(cmdAdd, cmdCheck, cmdDel, version.All, bv.BuildString("win-bridge"))
}
2 changes: 1 addition & 1 deletion plugins/main/windows/win-overlay/win-overlay_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,5 +173,5 @@ func cmdCheck(_ *skel.CmdArgs) error {
}

func main() {
skel.PluginMain(cmdAdd, cmdCheck, cmdDel, version.PluginSupports("0.1.0", "0.2.0", "0.3.0"), bv.BuildString("win-overlay"))
skel.PluginMain(cmdAdd, cmdCheck, cmdDel, version.All, bv.BuildString("win-overlay"))
}
2 changes: 1 addition & 1 deletion plugins/meta/bandwidth/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ func cmdDel(args *skel.CmdArgs) error {
}

func main() {
skel.PluginMain(cmdAdd, cmdCheck, cmdDel, version.PluginSupports("0.3.0", "0.3.1", version.Current()), bv.BuildString("bandwidth"))
skel.PluginMain(cmdAdd, cmdCheck, cmdDel, version.VersionsStartingFrom("0.3.0"), bv.BuildString("bandwidth"))
}

func SafeQdiscList(link netlink.Link) ([]netlink.Qdisc, error) {
Expand Down
2 changes: 1 addition & 1 deletion plugins/meta/firewall/firewall.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ func cmdDel(args *skel.CmdArgs) error {
}

func main() {
skel.PluginMain(cmdAdd, cmdCheck, cmdDel, version.PluginSupports("0.4.0"), bv.BuildString("firewall"))
skel.PluginMain(cmdAdd, cmdCheck, cmdDel, version.VersionsStartingFrom("0.4.0"), bv.BuildString("firewall"))
}

func cmdCheck(args *skel.CmdArgs) error {
Expand Down
2 changes: 1 addition & 1 deletion plugins/meta/vrf/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ type VRFNetConf struct {
}

func main() {
skel.PluginMain(cmdAdd, cmdCheck, cmdDel, version.PluginSupports("0.3.1", "0.4.0"), bv.BuildString("vrf"))
skel.PluginMain(cmdAdd, cmdCheck, cmdDel, version.VersionsStartingFrom("0.3.1"), bv.BuildString("vrf"))
}

func cmdAdd(args *skel.CmdArgs) error {
Expand Down
18 changes: 17 additions & 1 deletion vendor/github.com/containernetworking/cni/pkg/version/version.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ github.com/alexflint/go-filemutex
github.com/buger/jsonparser
# github.com/containerd/cgroups v1.0.1
github.com/containerd/cgroups/stats/v1
# github.com/containernetworking/cni v1.0.0
# github.com/containernetworking/cni v1.0.1
## explicit
github.com/containernetworking/cni/libcni
github.com/containernetworking/cni/pkg/invoke
Expand Down

0 comments on commit 189d0c0

Please sign in to comment.