summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDavid Crawshaw <crawshaw@tailscale.com>2020-07-04 20:26:46 +1000
committerJason A. Donenfeld <Jason@zx2c4.com>2020-07-14 23:18:53 -0600
commit507f148e1c42d2deaac524e759115a1b02730207 (patch)
treed1fd1dd7d08addf22024c044f5c01e93785e38b2
parent31b574ef99a79fb654085693423f48a3bf0e7f81 (diff)
device: remove bindsocketshim.go
Both wireguard-windows and wireguard-android access Bind directly for these methods now. Signed-off-by: David Crawshaw <crawshaw@tailscale.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-rw-r--r--device/bindsocketshim.go36
1 files changed, 0 insertions, 36 deletions
diff --git a/device/bindsocketshim.go b/device/bindsocketshim.go
deleted file mode 100644
index 896c7d2..0000000
--- a/device/bindsocketshim.go
+++ /dev/null
@@ -1,36 +0,0 @@
-/* SPDX-License-Identifier: MIT
- *
- * Copyright (C) 2017-2020 WireGuard LLC. All Rights Reserved.
- */
-
-package device
-
-import (
- "errors"
-
- "golang.zx2c4.com/wireguard/conn"
-)
-
-// TODO(crawshaw): this method is a compatibility shim. Replace with direct use of conn.
-func (device *Device) BindSocketToInterface4(interfaceIndex uint32, blackhole bool) error {
- if device.net.bind == nil {
- return errors.New("Bind is not yet initialized")
- }
-
- if iface, ok := device.net.bind.(conn.BindSocketToInterface); ok {
- return iface.BindSocketToInterface4(interfaceIndex, blackhole)
- }
- return nil
-}
-
-// TODO(crawshaw): this method is a compatibility shim. Replace with direct use of conn.
-func (device *Device) BindSocketToInterface6(interfaceIndex uint32, blackhole bool) error {
- if device.net.bind == nil {
- return errors.New("Bind is not yet initialized")
- }
-
- if iface, ok := device.net.bind.(conn.BindSocketToInterface); ok {
- return iface.BindSocketToInterface6(interfaceIndex, blackhole)
- }
- return nil
-}