summaryrefslogtreecommitdiffhomepage
path: root/pkg/server/sockopt.go
diff options
context:
space:
mode:
authorMilan Lenco <milan.lenco@pantheon.tech>2021-01-21 13:53:33 +0100
committerFUJITA Tomonori <fujita.tomonori@gmail.com>2021-02-13 18:54:31 +0900
commit3339f97722e35d5ff351ef500de1e61344cbd33d (patch)
tree600f85f5a0cd1440670c62c3fd881a3a6efb0645 /pkg/server/sockopt.go
parentc89a32ea7bbed1780b93431e2f94482df462206e (diff)
feat: add option to bind listener to a (VRF) device
Signed-off-by: Milan Lenco <milan.lenco@pantheon.tech>
Diffstat (limited to 'pkg/server/sockopt.go')
-rw-r--r--pkg/server/sockopt.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/pkg/server/sockopt.go b/pkg/server/sockopt.go
index 0aab0ba9..235bbbb9 100644
--- a/pkg/server/sockopt.go
+++ b/pkg/server/sockopt.go
@@ -17,6 +17,7 @@
package server
import (
+ "fmt"
"net"
"syscall"
@@ -27,10 +28,6 @@ func setTCPMD5SigSockopt(l *net.TCPListener, address string, key string) error {
return setTcpMD5SigSockopt(l, address, key)
}
-func setListenTCPTTLSockopt(l *net.TCPListener, ttl int) error {
- return setListenTcpTTLSockopt(l, ttl)
-}
-
func setTCPTTLSockopt(conn *net.TCPConn, ttl int) error {
return setTcpTTLSockopt(conn, ttl)
}
@@ -39,6 +36,10 @@ func setTCPMinTTLSockopt(conn *net.TCPConn, ttl int) error {
return setTcpMinTTLSockopt(conn, ttl)
}
+func setBindToDevSockopt(sc syscall.RawConn, device string) error {
+ return fmt.Errorf("binding connection to a device is not supported")
+}
+
func dialerControl(network, address string, c syscall.RawConn, ttl, ttlMin uint8, password string, bindInterface string) error {
if password != "" {
log.WithFields(log.Fields{