diff options
Diffstat (limited to 'extras/gomemif')
-rw-r--r-- | extras/gomemif/memif/control_channel.go | 3 | ||||
-rw-r--r-- | extras/gomemif/memif/interface.go | 1 | ||||
-rw-r--r-- | extras/gomemif/memif/memif.go | 6 |
3 files changed, 5 insertions, 5 deletions
diff --git a/extras/gomemif/memif/control_channel.go b/extras/gomemif/memif/control_channel.go index 32e34933ab4..12672e6e2f8 100644 --- a/extras/gomemif/memif/control_channel.go +++ b/extras/gomemif/memif/control_channel.go @@ -375,7 +375,6 @@ func (socket *Socket) addListener() (err error) { return fmt.Errorf("Failed to create UNIX domain socket") } usa := &syscall.SockaddrUnix{Name: socket.filename} - // Bind to address and start listening err = syscall.SetsockoptInt(fd, syscall.SOL_SOCKET, syscall.SO_PASSCRED, 1) if err != nil { @@ -518,7 +517,7 @@ func (cc *controlChannel) msgEnqInit() (err error) { init := MsgInit{ Version: Version, Id: cc.i.args.Id, - Mode: interfaceModeEthernet, + Mode: cc.i.args.Mode, } copy(init.Name[:], []byte(cc.socket.appName)) diff --git a/extras/gomemif/memif/interface.go b/extras/gomemif/memif/interface.go index a571deb43c9..15a8e87453c 100644 --- a/extras/gomemif/memif/interface.go +++ b/extras/gomemif/memif/interface.go @@ -71,6 +71,7 @@ type MemoryConfig struct { type Arguments struct { Id uint32 // Interface identifier unique across socket. Used to identify peer interface when connecting IsMaster bool // Interface role master/slave + Mode interfaceMode Name string Secret [24]byte // optional parameter, secrets of the interfaces must match if they are to connect MemoryConfig MemoryConfig diff --git a/extras/gomemif/memif/memif.go b/extras/gomemif/memif/memif.go index 1a7857de03e..bc1c560862f 100644 --- a/extras/gomemif/memif/memif.go +++ b/extras/gomemif/memif/memif.go @@ -52,9 +52,9 @@ const ( type interfaceMode uint8 const ( - interfaceModeEthernet interfaceMode = iota - interfaceModeIp - interfaceModePuntInject + InterfaceModeEthernet interfaceMode = iota + InterfaceModeIp + InterfaceModePuntInject ) const msgSize = 128 |