MCPcopy Index your code
hub / github.com/coder/coder / setInterfaceBridge

Function setInterfaceBridge

tailnet/test/integration/network.go:668–675  ·  view source on GitHub ↗

setInterfaceBridge sets the master of the given interface to the specified bridge.

(netNS *os.File, ifaceName, bridgeName string)

Source from the content-addressed store, hash-verified

666// setInterfaceBridge sets the master of the given interface to the specified
667// bridge.
668func setInterfaceBridge(netNS *os.File, ifaceName, bridgeName string) error {
669 _, err := commandInNetNS(netNS, "ip", []string{"link", "set", ifaceName, "master", bridgeName}).Output()
670 if err != nil {
671 return xerrors.Errorf("set interface %q master to %q in netns: %w", ifaceName, bridgeName, wrapExitErr(err))
672 }
673
674 return nil
675}
676
677type linkOption func(attrs netlink.LinkAttrs) netlink.LinkAttrs
678

Callers 1

joinBridgeFunction · 0.85

Calls 4

commandInNetNSFunction · 0.85
wrapExitErrFunction · 0.85
OutputMethod · 0.65
ErrorfMethod · 0.45

Tested by

no test coverage detected