Fix server to drop all packets from unverified clients.
Not just packets with srccall != login. Also made disallow_unverified to not be configurable (it defaulted to being enabled already, but there is no reason to disable it on aprs-is any more). Very slight optimisation aspect, too.
This commit is contained in:
parent
ded7b6146c
commit
b94077ccf3
|
|
@ -112,8 +112,6 @@ int obuf_size = 8*1024; /* size of output buffer for clients */
|
|||
|
||||
int new_fileno_limit;
|
||||
|
||||
int disallow_unverified = 1; /* don't allow unverified clients to transmit packets with srccall != login */
|
||||
|
||||
int verbose;
|
||||
|
||||
/* address:port pairs being listened */
|
||||
|
|
@ -156,7 +154,6 @@ static struct cfgcmd cfg_cmds[] = {
|
|||
{ "uplinkbind", _CFUNC_ do_uplinkbind, NULL },
|
||||
{ "uplink", _CFUNC_ do_uplink, &new_uplink_config },
|
||||
{ "peergroup", _CFUNC_ do_peergroup, &new_peerip_config },
|
||||
{ "disallow_unverified", _CFUNC_ do_boolean, &disallow_unverified },
|
||||
{ NULL, NULL, NULL }
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -56,7 +56,8 @@ extern int upstream_timeout;
|
|||
extern int client_timeout;
|
||||
extern int client_login_timeout;
|
||||
|
||||
extern int disallow_unverified; /* don't allow unverified clients to transmit packets with srccall != login */
|
||||
/*extern int disallow_unverified;*/ /* don't allow unverified clients to transmit packets with srccall != login */
|
||||
#define disallow_unverified (1)
|
||||
|
||||
extern int verbose;
|
||||
|
||||
|
|
|
|||
|
|
@ -582,9 +582,9 @@ int incoming_parse(struct worker_t *self, struct client_t *c, char *s, int len)
|
|||
originated_by_client = 1;
|
||||
|
||||
/* if disallow_unverified is enabled, don't allow unverified clients
|
||||
* to send packets where srccall != login
|
||||
* to send any packets
|
||||
*/
|
||||
if (!c->validated && !originated_by_client && disallow_unverified && !(c->flags & CLFLAGS_UPLINKPORT))
|
||||
if (!c->validated && disallow_unverified)
|
||||
return INERR_DISALLOW_UNVERIFIED;
|
||||
|
||||
/* check if the path contains NOGATE or other signs which tell the
|
||||
|
|
|
|||
Loading…
Reference in New Issue