Drop DX packets (DX de ...)
This commit is contained in:
parent
cf6f6e2ed7
commit
f08cee43bc
|
|
@ -77,7 +77,8 @@ const char *inerr_labels[] = {
|
||||||
"q_nonval_multi_q_calls",
|
"q_nonval_multi_q_calls",
|
||||||
"q_i_no_viacall",
|
"q_i_no_viacall",
|
||||||
"inerr_empty",
|
"inerr_empty",
|
||||||
"dis_srccall"
|
"disallow_srccall",
|
||||||
|
"disallow_dx"
|
||||||
};
|
};
|
||||||
|
|
||||||
#define incoming_strerror(i) ((i <= 0 && i >= INERR_MIN) ? inerr_labels[i * -1] : inerr_labels[0])
|
#define incoming_strerror(i) ((i <= 0 && i >= INERR_MIN) ? inerr_labels[i * -1] : inerr_labels[0])
|
||||||
|
|
|
||||||
|
|
@ -1216,6 +1216,12 @@ static int parse_aprs_body(struct pbuf_t *pb, const char *info_start)
|
||||||
return parse_aprs_item(pb, body, body_end);
|
return parse_aprs_item(pb, body, body_end);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
case 'D':
|
||||||
|
/* we drop DX beacon packets, they start with "DX de " */
|
||||||
|
if (strncmp(body, "X de ", 5) == 0)
|
||||||
|
return INERR_DIS_DX;
|
||||||
|
break;
|
||||||
|
|
||||||
case 'T':
|
case 'T':
|
||||||
if (body_end - body > 18) {
|
if (body_end - body > 18) {
|
||||||
|
|
|
||||||
|
|
@ -219,7 +219,9 @@ var rx_err_strings = {
|
||||||
"q_newq_buffer_small": 'New Q construct too big',
|
"q_newq_buffer_small": 'New Q construct too big',
|
||||||
"q_nonval_multi_q_calls": 'Multiple callsigns in Q path from unverified client',
|
"q_nonval_multi_q_calls": 'Multiple callsigns in Q path from unverified client',
|
||||||
"q_i_no_viacall": 'I path has no viacall',
|
"q_i_no_viacall": 'I path has no viacall',
|
||||||
"inerr_empty": 'Empty packet'
|
"inerr_empty": 'Empty packet',
|
||||||
|
"disallow_srcall": 'Disallowed source callsign (N0CALL or such)',
|
||||||
|
"disallow_dx": 'DX beacon packet'
|
||||||
};
|
};
|
||||||
|
|
||||||
var key_translate = {
|
var key_translate = {
|
||||||
|
|
|
||||||
|
|
@ -219,8 +219,9 @@ struct client_heard_t {
|
||||||
#define INERR_Q_I_NO_VIACALL -30
|
#define INERR_Q_I_NO_VIACALL -30
|
||||||
#define INERR_EMPTY -31
|
#define INERR_EMPTY -31
|
||||||
#define INERR_DIS_SRCCALL -32
|
#define INERR_DIS_SRCCALL -32
|
||||||
|
#define INERR_DIS_DX -33
|
||||||
|
|
||||||
#define INERR_MIN -32 /* MINIMUM VALUE FOR INERR, GROW WHEN NEEDED! */
|
#define INERR_MIN -33 /* MINIMUM VALUE FOR INERR, GROW WHEN NEEDED! */
|
||||||
/* WHEN ADDING STUFF HERE, REMEMBER TO UPDATE inerr_labels IN incoming.c. Thanks! */
|
/* WHEN ADDING STUFF HERE, REMEMBER TO UPDATE inerr_labels IN incoming.c. Thanks! */
|
||||||
#define INERR_BUCKETS (INERR_MIN*-1 + 1)
|
#define INERR_BUCKETS (INERR_MIN*-1 + 1)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -85,6 +85,8 @@ my @pkts = (
|
||||||
"N0CALL>DST,DIGI,qAR,$login:>should drop, N0CALL as source callsign",
|
"N0CALL>DST,DIGI,qAR,$login:>should drop, N0CALL as source callsign",
|
||||||
"NOCALL>DST,DIGI,qAR,$login:>should drop, NOCALL as source callsign",
|
"NOCALL>DST,DIGI,qAR,$login:>should drop, NOCALL as source callsign",
|
||||||
"SERVER>DST,DIGI,qAR,$login:>should drop, SERVER as source callsign",
|
"SERVER>DST,DIGI,qAR,$login:>should drop, SERVER as source callsign",
|
||||||
|
# DX spots
|
||||||
|
"SRC>DST,DIGI,qAR,$login:DX de FOO: BAR - should drop",
|
||||||
);
|
);
|
||||||
|
|
||||||
# send the packets
|
# send the packets
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue