Maint: routing interface composition

This commit is contained in:
Quentin McGaw (desktop)
2021-07-26 16:18:53 +00:00
parent 73c383fd65
commit d7a6caa2ac
5 changed files with 57 additions and 11 deletions

View File

@@ -10,6 +10,10 @@ var (
ErrAddOutboundSubnet = errors.New("cannot add outbound subnet to routes")
)
type OutboundRoutesSetter interface {
SetOutboundRoutes(outboundSubnets []net.IPNet) error
}
func (r *routing) SetOutboundRoutes(outboundSubnets []net.IPNet) error {
defaultInterface, defaultGateway, err := r.DefaultRoute()
if err != nil {