Skip to content

Commit fdc09de

Browse files
committed
Don't announce via DNS-SD if KISS port not configured
When "KISSPORT 0" is used in the config file to remove the default port, and no other port is configured, Direwolf still announces a KISS service on port 0. This is happening because the check for a valid KISS port was not updated when 'kiss_port' was changed from a single value to an array (for support of multiple KISS ports), so the test is checking against the wrong value. Checking against the first port in the list, per this commit, is consistent with the use of this same value for the port number that is announced via DNS-SD. When support is added for announcing multiple ports, this check should be updated to check for any valid port. Fixes #386
1 parent fa3c231 commit fdc09de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/direwolf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1137,7 +1137,7 @@ int main (int argc, char *argv[])
11371137
kissnet_init (&misc_config);
11381138

11391139
#if (USE_AVAHI_CLIENT|USE_MACOS_DNSSD)
1140-
if (misc_config.kiss_port > 0 && misc_config.dns_sd_enabled)
1140+
if (misc_config.kiss_port[0] > 0 && misc_config.dns_sd_enabled)
11411141
dns_sd_announce(&misc_config);
11421142
#endif
11431143

0 commit comments

Comments
 (0)