f-41: netif: MAC des bridges posée à la création (course avec udev) #41

Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
GnomeZworc 2026-10-12 13:59:37 +02:00
commit ec7bf79e98
Signed by: nicolas.boufideline
GPG key ID: 4406BBBF8845D632
7 changed files with 16 additions and 37 deletions

View file

@ -1,14 +1,17 @@
package netif
import (
"net"
"github.com/vishvananda/netlink"
)
func CreateBridge(name string, mtu int) error {
func CreateBridge(name string, mtu int, mac net.HardwareAddr) error {
br := &netlink.Bridge{
LinkAttrs: netlink.LinkAttrs{
Name: name,
MTU: mtu,
Name: name,
MTU: mtu,
HardwareAddr: mac,
},
}