Null/incorrect values logged by addrwatch_syslog
While working on the addrwatch (1.0.2) package for OpenWrt (https://github.com/openwrt/packages/pull/15899) I saw what looked like null/incorrect values being logged by addrwatch_syslog. I was testing using an armvirt-32 snapshot image in qemu (like most architectures supported by OpenWrt, this uses musl instead of glibc).
I enabled file output and also ran addrwatch_syslog. The file output looked normal:
1624004401 eth1 0 52:54:00:12:34:57 10.0.2.15 ARP_REQ
1624004401 eth1 0 52:55:0a:00:02:02 10.0.2.2 ARP_REP
1624004433 eth1 0 52:54:00:12:34:57 10.0.2.15 ARP_REQ
1624004433 eth1 0 52:55:0a:00:02:02 10.0.2.2 ARP_REP
However this was what I saw in syslog:
Fri Jun 18 08:20:01 2021 daemon.info addrwatch: 1624004401 (null) 3069243648 (null) 52:54:00:12:34:57 10.0.2.15
Fri Jun 18 08:20:01 2021 daemon.info addrwatch: 1624004401 (null) 3069243704 (null) 52:55:0a:00:02:02 10.0.2.2
Fri Jun 18 08:20:33 2021 daemon.info addrwatch: 1624004433 (null) 3069243760 (null) 52:54:00:12:34:57 10.0.2.15
Fri Jun 18 08:20:33 2021 daemon.info addrwatch: 1624004433 (null) 3069243816 (null) 52:55:0a:00:02:02 10.0.2.2
The interface names and mac addresses were missing (replaced with (null)) and the vlan tag values appear to be incorrect.
I have the same problem with addwatch_syslog - and it seems the be the same problem as the for addrwatch_stdout (https://github.com/fln/addrwatch/issues/26). See my comment: https://github.com/fln/addrwatch/issues/26#issuecomment-867818413 - it may help solve both.