Skip to content

Commit

Permalink
fix: add dhcp discover packet to linux swiftv2 to ensure mappings exi…
Browse files Browse the repository at this point in the history
…st for dns (#2989)

* add dhcp client

* address linter issues

* issue dhcp discover request without libraries

* remove library references

* add build tag and remove rand dependency

* address linter issues

* update logging

* fix logging

* move unix sockets to interface to address feedback

* address linter issues

* prevent leaking sockets on error

* remove reuse address option

* add comments

* make dhcp client
  • Loading branch information
QxBytes authored Sep 10, 2024
1 parent 0c48fa0 commit 47b4329
Show file tree
Hide file tree
Showing 12 changed files with 564 additions and 32 deletions.
3 changes: 2 additions & 1 deletion cni/network/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"github.com/Azure/azure-container-networking/cns"
cnscli "github.com/Azure/azure-container-networking/cns/client"
"github.com/Azure/azure-container-networking/common"
"github.com/Azure/azure-container-networking/dhcp"
"github.com/Azure/azure-container-networking/iptables"
"github.com/Azure/azure-container-networking/netio"
"github.com/Azure/azure-container-networking/netlink"
Expand Down Expand Up @@ -130,7 +131,7 @@ func NewPlugin(name string,

nl := netlink.NewNetlink()
// Setup network manager.
nm, err := network.NewNetworkManager(nl, platform.NewExecClient(logger), &netio.NetIO{}, network.NewNamespaceClient(), iptables.NewClient())
nm, err := network.NewNetworkManager(nl, platform.NewExecClient(logger), &netio.NetIO{}, network.NewNamespaceClient(), iptables.NewClient(), dhcp.New(logger))
if err != nil {
return nil, err
}
Expand Down
Loading

0 comments on commit 47b4329

Please sign in to comment.