n2ygk / aprsdigi

a linux amateur radio APRS digipeater
GNU General Public License v2.0
25 stars 8 forks source link

Ignored nobud when processing incoming packets #2

Closed kronenpj closed 5 years ago

kronenpj commented 5 years ago

The --nobud option is recognized during startup but packets that should match are not blocked. I'm not sure why there's a CIDR /48 netmask on a callsign, but that may be another bug.

# aprsdigi -v --notx --notxsame --interface ax25:N2KIQ:N2KIQ-1 --kill_dupes --kill_loops --flood WIDE --nobud ax25:N4APD
Linux APRS(tm) digipeater
Copyright (c) 1996,1997,1999,2001,2002,2003,2004,2009,2012 Alan Crosswell, n2ygk@weca.org
Version: aprsdigi aprsdigi-3.10.0
This is free software covered under the GNU General Public License.
There is no warranty.  See the file COPYING for details.

# configuration:
 budlist 1 deny N4APD/48
interface ax25:N2KIQ
 callsign N2KIQ
 alias N2KIQ-1
 option SUBST_MYCALL off
 option MICE_XLATE off
 option X1J4_XLATE off
 option I_TX off
 option I_RX on
 option I_TXSAME off
 option I_3RDP off
 option idinterval 570 #(09:30)
 option tag #(none)
# end of configuration

...

20:05:16 N2KIQ: RX: N4APD-1>APTW01,WIDE1-1,WIDE2-1:_03101615c136s000g000t086r000p000P000h48b10156tU2k
packet is permitted by budlist.
packet is not from me.
is not mic_e...
did not require destination SSID handling.
packet is repeatable. (r=1)
dupe @ 0x16f1310:  prev->0x0  next->0x0  time 1552248142  len 27
packet is not a dupe or loop
packet is not addressed to me.
Did  not  require special flooding handling.
Did not require conventional digipeat handling.
n2ygk commented 5 years ago

The /48 mask indicates that the first 48 bits (6 characters) of the callsign are to be matched (e.g. the callsign and all SSIDs) since the AX.25 callsign field is 6 characters (even if the callsign is shorter).

However, I believe the issue is that you have to specify all options that apply to the interface before the interface is specified. Try this:

# aprsdigi -v --notx --notxsame  --nobud ax25:N4APD --interface ax25:N2KIQ:N2KIQ-1 --kill_dupes --kill_loops --flood WIDE

You'll note that the configuration printout defines budlist 1 but doesn't apply it to the interface. (The configuration output was meant to eventually be accepted as input from a config file but I never got to implementing that.)

The idea was that global or per-interface options can be configured first and then they apply to each interface. Kind of hokey. Sorry.