-
Notifications
You must be signed in to change notification settings - Fork 575
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add support for configuring vlan filtering on the bridge
Fixes #8941 Signed-off-by: Andrey Smirnov <[email protected]>
- Loading branch information
Showing
18 changed files
with
1,421 additions
and
947 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
internal/app/machined/pkg/adapters/network/bridge_master_spec_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// This Source Code Form is subject to the terms of the Mozilla Public | ||
// License, v. 2.0. If a copy of the MPL was not distributed with this | ||
// file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
|
||
package network_test | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/stretchr/testify/require" | ||
|
||
networkadapter "github.com/siderolabs/talos/internal/app/machined/pkg/adapters/network" | ||
"github.com/siderolabs/talos/pkg/machinery/resources/network" | ||
) | ||
|
||
func TestBridgeMasterSpec(t *testing.T) { | ||
spec := network.BridgeMasterSpec{ | ||
STP: network.STPSpec{ | ||
Enabled: true, | ||
}, | ||
VLAN: network.BridgeVLANSpec{ | ||
FilteringEnabled: true, | ||
}, | ||
} | ||
|
||
b, err := networkadapter.BridgeMasterSpec(&spec).Encode() | ||
require.NoError(t, err) | ||
|
||
var decodedSpec network.BridgeMasterSpec | ||
|
||
require.NoError(t, networkadapter.BridgeMasterSpec(&decodedSpec).Decode(b)) | ||
|
||
require.Equal(t, spec, decodedSpec) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.