net: mark netadapter IP as sensitive option (#312)

## Link to GitHub Issue, if one exists
n/a

## Description of change
Mark the option as "sensitive" which censors the option value (adapter's
IP address)
Remove the log entry from spice

This isn't perfect because most of the games like to log the IP address
and subnet anyway, but at least spice itself will stop doing it.

## Testing
Tested 64 bit LDJ with parameter set.
This commit is contained in:
bicarus-dev
2025-05-04 13:20:37 -07:00
committed by GitHub
parent e4cfb808bf
commit f40c382903
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -179,7 +179,7 @@ void networkhook_init() {
strncpy(s_prefix, inet_ntoa(prefix), 16); strncpy(s_prefix, inet_ntoa(prefix), 16);
// log preferences // log preferences
log_info("network", "Network preferences: {}", s_network, s_subnet, s_prefix); // log_info("network", "Network preferences: {}, {}, {}", s_network, s_subnet, s_prefix);
// GetAdaptersInfo hook // GetAdaptersInfo hook
auto orig_addr = detour::iat_try( auto orig_addr = detour::iat_try(
+1
View File
@@ -306,6 +306,7 @@ static const std::vector<OptionDefinition> OPTION_DEFINITIONS = {
"Force the use of an adapter with the specified network. Must also provide -subnet", "Force the use of an adapter with the specified network. Must also provide -subnet",
.type = OptionType::Text, .type = OptionType::Text,
.category = "Network Adapters", .category = "Network Adapters",
.sensitive = true,
}, },
{ {
.title = "Preferred NetAdapter Subnet", .title = "Preferred NetAdapter Subnet",