bridge: include attempted IP address in AddrAdd error message This PR includes the IP in the `AddrAdd` error message which could help debug better with any issues while adding the IP address to the bridge and improves the readability. Signed-off-by: Amulyam24 <amulmek1@in.ibm.com>
diff --git a/plugins/main/bridge/bridge.go b/plugins/main/bridge/bridge.go index 0b5a157..476e6d5 100644 --- a/plugins/main/bridge/bridge.go +++ b/plugins/main/bridge/bridge.go
@@ -295,7 +295,7 @@ addr := &netlink.Addr{IPNet: ipn, Label: ""} if err := netlink.AddrAdd(br, addr); err != nil && err != syscall.EEXIST { - return fmt.Errorf("could not add IP address to %q: %v", br.Attrs().Name, err) + return fmt.Errorf("could not add IP address %s to %q: %v", ipnStr, br.Attrs().Name, err) } // Set the bridge's MAC to itself. Otherwise, the bridge will take the