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:
parent
0679639b95
commit
ec7bf79e98
7 changed files with 16 additions and 37 deletions
|
|
@ -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,
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue