Skip to content

Commit

Permalink
bridge: remove useless variable
Browse files Browse the repository at this point in the history
  • Loading branch information
arthur-zhang committed Oct 26, 2023
1 parent 2773cea commit b506bde
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions plugins/main/bridge/bridge.go
Original file line number Diff line number Diff line change
Expand Up @@ -629,14 +629,10 @@ func cmdAdd(args *skel.CmdArgs) error {
}

if n.IsGW {
var firstV4Addr net.IP
var vlanInterface *current.Interface
// Set the IP address(es) on the bridge and enable forwarding
for _, gws := range []*gwInfo{gwsV4, gwsV6} {
for _, gw := range gws.gws {
if gw.IP.To4() != nil && firstV4Addr == nil {
firstV4Addr = gw.IP
}
if n.Vlan != 0 {
vlanIface, err := ensureVlanInterface(br, n.Vlan, n.PreserveDefaultVlan)
if err != nil {
Expand Down

0 comments on commit b506bde

Please sign in to comment.