@ -437,18 +437,7 @@ func runUp(ctx context.Context, cmd string, args []string, upArgs upArgsT) (retE
fatalf ( "%s" , err )
fatalf ( "%s" , err )
}
}
if len ( prefs . AdvertiseRoutes ) > 0 || prefs . AppConnector . Advertise {
warnOnAdvertiseRouts ( ctx , prefs )
// TODO(jwhited): compress CheckIPForwarding and CheckUDPGROForwarding
// into a single HTTP req.
if err := localClient . CheckIPForwarding ( ctx ) ; err != nil {
warnf ( "%v" , err )
}
if runtime . GOOS == "linux" {
if err := localClient . CheckUDPGROForwarding ( ctx ) ; err != nil {
warnf ( "%v" , err )
}
}
}
curPrefs , err := localClient . GetPrefs ( ctx )
curPrefs , err := localClient . GetPrefs ( ctx )
if err != nil {
if err != nil {
@ -1159,3 +1148,18 @@ func resolveAuthKey(ctx context.Context, v, tags string) (string, error) {
}
}
return authkey , nil
return authkey , nil
}
}
func warnOnAdvertiseRouts ( ctx context . Context , prefs * ipn . Prefs ) {
if len ( prefs . AdvertiseRoutes ) > 0 || prefs . AppConnector . Advertise {
// TODO(jwhited): compress CheckIPForwarding and CheckUDPGROForwarding
// into a single HTTP req.
if err := localClient . CheckIPForwarding ( ctx ) ; err != nil {
warnf ( "%v" , err )
}
if runtime . GOOS == "linux" {
if err := localClient . CheckUDPGROForwarding ( ctx ) ; err != nil {
warnf ( "%v" , err )
}
}
}
}