diff --git a/src/utils/components/PolicyForm/PolicyForm.tsx b/src/utils/components/PolicyForm/PolicyForm.tsx index 6eb114bd..3f51a527 100644 --- a/src/utils/components/PolicyForm/PolicyForm.tsx +++ b/src/utils/components/PolicyForm/PolicyForm.tsx @@ -49,7 +49,14 @@ const PolicyForm: FC = ({ policy, setPolicy, createForm = false type: InterfaceType.LINUX_BRIDGE, name: `interface-${draftPolicy.spec.desiredState.interfaces.length}`, state: 'up', - }); + bridge: { + options: { + stp: { + enabled: false, + }, + }, + }, + } as NodeNetworkConfigurationInterface); }); }; diff --git a/src/utils/components/PolicyForm/PolicyInterface.tsx b/src/utils/components/PolicyForm/PolicyInterface.tsx index c47bbd0d..5e1f0e60 100644 --- a/src/utils/components/PolicyForm/PolicyInterface.tsx +++ b/src/utils/components/PolicyForm/PolicyInterface.tsx @@ -69,7 +69,7 @@ const PolicyInterface: FC = ({ if (newType === InterfaceType.LINUX_BRIDGE) { delete draftInterface['link-aggregation']; - draftInterface.bridge = { port: [], options: {} }; + draftInterface.bridge = { port: [], options: { stp: { enabled: false } } }; } if (newType === InterfaceType.BOND) { @@ -363,7 +363,7 @@ const PolicyInterface: FC = ({ } id={`policy-interface-stp-${id}`} - isChecked={policyInterface?.bridge?.options?.stp?.enabled} + isChecked={policyInterface?.bridge?.options?.stp?.enabled !== false} onChange={(_, newValue) => onSTPChange(newValue)} isDisabled={isInterfaceCreated} /> diff --git a/src/views/policies/new/NewPolicy.tsx b/src/views/policies/new/NewPolicy.tsx index 447a4f64..80cd24c3 100644 --- a/src/views/policies/new/NewPolicy.tsx +++ b/src/views/policies/new/NewPolicy.tsx @@ -40,6 +40,13 @@ const initialPolicy: V1NodeNetworkConfigurationPolicy = { name: 'br0', type: InterfaceType.LINUX_BRIDGE, state: NETWORK_STATES.Up, + bridge: { + options: { + stp: { + enabled: false, + }, + }, + }, } as NodeNetworkConfigurationInterface, ], },