wgengine: fix the build on darwin, windows, openbsd.

7e5e3277 changed the Router interface definition, but forgot to
fix up these platform files.

Signed-off-by: David Anderson <dave@natulte.net>
pull/44/head
David Anderson 5 years ago
parent 67c1b2c6ef
commit 36f5433476

@ -32,5 +32,6 @@ func (r *darwinRouter) SetRoutes(rs RouteSettings) error {
return nil return nil
} }
func (r *darwinRouter) Close() { func (r *darwinRouter) Close() error {
return nil
} }

@ -155,7 +155,7 @@ func (r *openbsdRouter) SetRoutes(rs RouteSettings) error {
return errq return errq
} }
func (r *openbsdRouter) Close() { func (r *openbsdRouter) Close() error {
out, err := cmd("ifconfig", r.tunname, "down").CombinedOutput() out, err := cmd("ifconfig", r.tunname, "down").CombinedOutput()
if err != nil { if err != nil {
r.logf("running ifconfig failed: %v\n%s", err, out) r.logf("running ifconfig failed: %v\n%s", err, out)
@ -166,6 +166,8 @@ func (r *openbsdRouter) Close() {
} }
// TODO(mbaillie): wipe routes // TODO(mbaillie): wipe routes
return nil
} }
// TODO(mbaillie): these are no-ops for now. They could re-use the Linux funcs // TODO(mbaillie): these are no-ops for now. They could re-use the Linux funcs

@ -51,8 +51,9 @@ func (r *winRouter) SetRoutes(rs RouteSettings) error {
return nil return nil
} }
func (r *winRouter) Close() { func (r *winRouter) Close() error {
if r.routeChangeCallback != nil { if r.routeChangeCallback != nil {
r.routeChangeCallback.Unregister() r.routeChangeCallback.Unregister()
} }
return nil
} }

Loading…
Cancel
Save