aboutsummaryrefslogtreecommitdiffstats
path: root/src/conn.go
diff options
context:
space:
mode:
authorMathias Hall-Andersen <mathias@hall-andersen.dk>2017-11-19 00:21:58 +0100
committerMathias Hall-Andersen <mathias@hall-andersen.dk>2017-11-19 00:21:58 +0100
commita79fdc13a2d7be07b20ea499da9210ebe69f1958 (patch)
tree15e8f2cc4512130efe83ed532deff53f801f6df3 /src/conn.go
parentMoved endpoint into interface and simplified peer (diff)
downloadwireguard-go-a79fdc13a2d7be07b20ea499da9210ebe69f1958.tar.xz
wireguard-go-a79fdc13a2d7be07b20ea499da9210ebe69f1958.zip
Begin generic Bind implementation
Diffstat (limited to 'src/conn.go')
-rw-r--r--src/conn.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/conn.go b/src/conn.go
index 74bb075..5b40a23 100644
--- a/src/conn.go
+++ b/src/conn.go
@@ -24,11 +24,9 @@ type Bind interface {
*/
type Endpoint interface {
ClearSrc() // clears the source address
- ClearDst() // clears the destination address
SrcToString() string // returns the local source address (ip:port)
DstToString() string // returns the destination address (ip:port)
DstToBytes() []byte // used for mac2 cookie calculations
- SetDst(string) error // used for manually setting the endpoint (uapi)
DstIP() net.IP
SrcIP() net.IP
}
@@ -92,7 +90,7 @@ func UpdateUDPListener(device *Device) error {
// bind to new port
var err error
- netc.bind, netc.port, err = CreateUDPBind(netc.port)
+ netc.bind, netc.port, err = CreateBind(netc.port)
if err != nil {
netc.bind = nil
return err