diff --git a/CHANGELOG.md b/CHANGELOG.md index ae397c3ff..07fbc962a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ Changes: * `--battery-use-setup-api`: control whether `SetupAPI` should be used on Windows to detect battery info, which supports multi batteries, but slower. * `--wm-detect-plugin`: control whether WM plugins should be detected. Note it's implemented with global processes enumeration and can report false results. * `--de-slow-version-detection`: control DE version should be detected with slow operations. It's usually not necessary and only provided as a backup. +* `--localip-default-route-only` and `--netio-default-route-only` defaults to true to avoid large number of results Features: * Quirks for MIPS platforms (CPU, Linux) diff --git a/doc/json_schema.json b/doc/json_schema.json index 801925de4..4dec417bd 100644 --- a/doc/json_schema.json +++ b/doc/json_schema.json @@ -1243,7 +1243,7 @@ "defaultRouteOnly": { "description": "Show ips that are used for default routing only", "type": "boolean", - "default": false + "default": true }, "key": { "$ref": "#/$defs/key" @@ -1274,7 +1274,7 @@ "defaultRouteOnly": { "description": "Show ips that are used for default routing only", "type": "boolean", - "default": false + "default": true }, "key": { "$ref": "#/$defs/key" diff --git a/src/data/help.txt b/src/data/help.txt index a1516699d..ef5b98569 100644 --- a/src/data/help.txt +++ b/src/data/help.txt @@ -160,10 +160,10 @@ Module specific options: --localip-show-mac : Show mac addresses in local ip module. Default is false --localip-show-loop : Show loop back addresses (127.0.0.1) in local ip module. Default is false --localip-name-prefix : Show interfaces with given interface name prefix only. Default is empty - --localip-default-route-only : Show the interface that is used for default routing only. Default is false + --localip-default-route-only : Show the interface that is used for default routing only. Default is true --localip-compact : Show all IPs in one line. Default is false --netio-name-prefix : Show interfaces with given name prefix only. Default is empty - --netio-default-route-only : Show the interfac that is used for default routing only. Default is false + --netio-default-route-only : Show the interfac that is used for default routing only. Default is true --publicip-timeout: Time in milliseconds to wait for the public ip server to respond. Default is disabled (0) --publicip-url: The URL of public IP detection server to be used. --weather-location: Set the location to be used. It must be URI encoded (eg a whitespace must be encoded as `+`). diff --git a/src/modules/localip/localip.c b/src/modules/localip/localip.c index 9f17891fc..4d2150f8d 100644 --- a/src/modules/localip/localip.c +++ b/src/modules/localip/localip.c @@ -105,7 +105,7 @@ void ffPrintLocalIp(FFLocalIpOptions* options) if(options->moduleArgs.outputFormat.length == 0) { ffPrintLogoAndKey(key.chars, 0, &options->moduleArgs, FF_PRINT_TYPE_NO_CUSTOM_KEY); - printIp(ip, !options->defaultRouteOnly); + printIp(ip, true); putchar('\n'); } else @@ -370,7 +370,7 @@ void ffInitLocalIpOptions(FFLocalIpOptions* options) options->showType = FF_LOCALIP_TYPE_IPV4_BIT; ffStrbufInit(&options->namePrefix); - options->defaultRouteOnly = false; + options->defaultRouteOnly = true; } void ffDestroyLocalIpOptions(FFLocalIpOptions* options) diff --git a/src/modules/netio/netio.c b/src/modules/netio/netio.c index 9542cb021..6105e52ef 100644 --- a/src/modules/netio/netio.c +++ b/src/modules/netio/netio.c @@ -230,7 +230,7 @@ void ffInitNetIOOptions(FFNetIOOptions* options) ffOptionInitModuleArg(&options->moduleArgs); ffStrbufInit(&options->namePrefix); - options->defaultRouteOnly = false; + options->defaultRouteOnly = true; } void ffDestroyNetIOOptions(FFNetIOOptions* options)