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>
This commit is contained in:
parent
67c1b2c6ef
commit
36f5433476
|
@ -32,5 +32,6 @@ func (r *darwinRouter) SetRoutes(rs RouteSettings) error {
|
|||
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
|
||||
}
|
||||
|
||||
func (r *openbsdRouter) Close() {
|
||||
func (r *openbsdRouter) Close() error {
|
||||
out, err := cmd("ifconfig", r.tunname, "down").CombinedOutput()
|
||||
if err != nil {
|
||||
r.logf("running ifconfig failed: %v\n%s", err, out)
|
||||
|
@ -166,6 +166,8 @@ func (r *openbsdRouter) Close() {
|
|||
}
|
||||
|
||||
// TODO(mbaillie): wipe routes
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// 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
|
||||
}
|
||||
|
||||
func (r *winRouter) Close() {
|
||||
func (r *winRouter) Close() error {
|
||||
if r.routeChangeCallback != nil {
|
||||
r.routeChangeCallback.Unregister()
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue