Skip to content

Commit d460328

Browse files
committed
fix: return proper value from Bridge.STP instead of plain nil
Since we are returning interfaces in config, we have to return something typed for method chaining to work. Otherwise, it simply doesn't know what method to call because there is no type information. We also don't want to change the default config behavior, so we don't try to check for `nil` after calling `.STP()`. Closes #8626 Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
1 parent bac1d00 commit d460328

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/machinery/config/types/v1alpha1/v1alpha1_provider.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1047,7 +1047,7 @@ func (b *Bridge) Interfaces() []string {
10471047
// STP implements the config.Bridge interface.
10481048
func (b *Bridge) STP() config.STP {
10491049
if b.BridgeSTP == nil {
1050-
return nil
1050+
return (*STP)(nil)
10511051
}
10521052

10531053
return b.BridgeSTP

0 commit comments

Comments
 (0)