Skip to content

Commit

Permalink
Fix bridge IP source after NI modification
Browse files Browse the repository at this point in the history
There is a small bug in the master recently introduced, where
the address source of the reported bridge IP changes from
AddressSourceEVEInternal to AddressSourceUndefined when NI config
is modified in any way (note that IP source is reported only internally
between microservices, not to the controller).
While the reported source of the bridge IP is not important at all,
we should still fix it to avoid any confusion.

Signed-off-by: Milan Lenco <milan@zededa.com>
  • Loading branch information
milan-zededa authored and OhmSpectator committed Sep 16, 2024
1 parent 5b878f3 commit 4732410
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/pillar/cmd/zedrouter/pubsubhandlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,11 @@ func (z *zedrouter) handleNetworkInstanceModify(ctxArg interface{}, key string,
}
if status.Gateway != nil && status.BridgeMac != nil {
addrs := types.AssignedAddrs{
IPv4Addrs: []types.AssignedAddr{{Address: status.Gateway}},
IPv4Addrs: []types.AssignedAddr{
{
Address: status.Gateway,
AssignedBy: types.AddressSourceEVEInternal,
}},
}
status.IPAssignments[status.BridgeMac.String()] = addrs
status.BridgeIPAddr = status.Gateway
Expand Down

0 comments on commit 4732410

Please sign in to comment.