summaryrefslogtreecommitdiffhomepage
path: root/device/device.go
diff options
context:
space:
mode:
Diffstat (limited to 'device/device.go')
-rw-r--r--device/device.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/device/device.go b/device/device.go
index 11119f9..c64432e 100644
--- a/device/device.go
+++ b/device/device.go
@@ -430,6 +430,12 @@ func unsafeCloseBind(device *Device) error {
return err
}
+func (device *Device) Bind() conn.Bind {
+ device.net.Lock()
+ defer device.net.Unlock()
+ return device.net.bind
+}
+
func (device *Device) BindSetMark(mark uint32) error {
device.net.Lock()