Skip to content

Commit 3e9da1f

Browse files
committed
feat: add bridge interfaces
1 parent c0c56bc commit 3e9da1f

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

node/net.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"inet.af/netaddr"
1111
)
1212

13-
var netDeviceFilterRe = regexp.MustCompile(`^(en(p\d+)?p\d+s\d+(f\d+)?|eth\d+|eno\d+|ens\d+|em\d+|bond\d+|p\d+p\d+|enx[0-9a-f]+)`)
13+
var netDeviceFilterRe = regexp.MustCompile(`^(en(p\d+)?p\d+s\d+(f\d+)?|eth\d+|eno\d+|ens\d+|em\d+|bond\d+|p\d+p\d+|enx[0-9a-f]+|br\d+|vmbr\d+)`)
1414

1515
func netDeviceFilter(name string) bool {
1616
return netDeviceFilterRe.MatchString(strings.ToLower(name))

node/net_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ func TestNetDeviceFilter(t *testing.T) {
1919
assert.True(t, netDeviceFilter("enP4p65s0"))
2020
assert.True(t, netDeviceFilter("enP2p33s0"))
2121
assert.True(t, netDeviceFilter("enX0"))
22+
assert.True(t, netDeviceFilter("br0"))
23+
assert.True(t, netDeviceFilter("vmbr0"))
2224

2325
assert.False(t, netDeviceFilter("dummy0"))
2426
assert.False(t, netDeviceFilter("docker0"))

0 commit comments

Comments
 (0)