wb2osz / direwolf

Dire Wolf is a software "soundcard" AX.25 packet modem/TNC and APRS encoder/decoder. It can be used stand-alone to observe APRS traffic, as a tracker, digipeater, APRStt gateway, or Internet Gateway (IGate). For more information, look at the bottom 1/4 of this page and in https://github.com/wb2osz/direwolf/blob/dev/doc/README.md
GNU General Public License v2.0
1.54k stars 301 forks source link

Don't register with avahi if KISSPORT is disabled #386

Open ghulands opened 2 years ago

ghulands commented 2 years ago

I have a setup where i'm using only an igate to publish weather data so I have in my config the kiss and agw ports set to 0. The logs show that it still registers with avahi with port 0.

LOGDIR /var/log/direwolf-wx/
ADEVICE null null

CHANNEL 0
MYCALL N0CALL-13

KISSPORT 0
AGWPORT 0

IGSERVER noam.aprs2.net
IGLOGIN N0CALL-13 12345
IGFILTER  t/m/N0CALL-13/1
# send weather info over igate
PBEACON sendto=IG delay=1 every=5 symbol="weather station" lat=XX.XXXXX long=XX.XXXX commentcmd="curl --silent http://wx/wxnow.txt | tail -1"

Logs

Apr  7 16:04:42 aprs direwolf-wx[5050]: DNS-SD: Avahi: Announcing KISS TCP on port 0 as 'Dire Wolf on aprs'
Apr  7 16:04:42 aprs direwolf-wx[5050]: DNS-SD: Avahi: Service name collision, renaming service to 'Dire Wolf on aprs #2'
Apr  7 16:04:42 aprs direwolf-wx[5050]: DNS-SD: Avahi: Announcing KISS TCP on port 0 as 'Dire Wolf on aprs #2'
Apr  7 16:04:42 aprs direwolf-wx[5050]: DNS-SD: Avahi: Service 'Dire Wolf on aprs #2' successfully registered.

Registering to avahi should only happen when the KISSPORT > 0.

ghulands commented 2 years ago

I just found the PR where the port check is there, but it doesn't seem to work.

I worked out from the code a work around by having in the config

DNSSD 0