Compare commits
3 Commits
release/2.
...
main
| Author | SHA1 | Date |
|---|---|---|
|
|
96ea2f9079 | |
|
|
5e22b37c57 | |
|
|
c11122c2b0 |
Binary file not shown.
|
|
@ -1 +1 @@
|
||||||
2.1.13
|
2.1.14
|
||||||
|
|
|
||||||
19
src/login.c
19
src/login.c
|
|
@ -42,6 +42,13 @@ static const char *quirks_mode_blacklist[] = {
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* known-broken applications which do not implement TX igate properly, do not pass packets downstream
|
||||||
|
*/
|
||||||
|
static const char *igate_tx_blacklist[] = {
|
||||||
|
"GW1000", /* Does not transmit 3rd party format on RF */
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Parse the login string in a HTTP POST or UDP submit packet
|
* Parse the login string in a HTTP POST or UDP submit packet
|
||||||
* Argh, why are these not in standard POST parameters in HTTP?
|
* Argh, why are these not in standard POST parameters in HTTP?
|
||||||
|
|
@ -165,6 +172,15 @@ void login_set_app_name(struct client_t *c, const char *app_name, const char *ap
|
||||||
sanitize_ascii_string(c->app_version);
|
sanitize_ascii_string(c->app_version);
|
||||||
|
|
||||||
/* check the application name against a static list of broken apps */
|
/* check the application name against a static list of broken apps */
|
||||||
|
for (i = 0; (igate_tx_blacklist[i]); i++) {
|
||||||
|
if (prefixmatch(c->app_name, igate_tx_blacklist[i])) {
|
||||||
|
hlog(LOG_INFO, "%s/%s: Not transmitting packets to broken TX igate: %s %s",
|
||||||
|
c->addr_rem, c->username, c->app_name, c->app_version);
|
||||||
|
c->no_tx = 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (quirks_mode) {
|
if (quirks_mode) {
|
||||||
c->quirks_mode = 1;
|
c->quirks_mode = 1;
|
||||||
return;
|
return;
|
||||||
|
|
@ -173,13 +189,12 @@ void login_set_app_name(struct client_t *c, const char *app_name, const char *ap
|
||||||
c->quirks_mode = 0;
|
c->quirks_mode = 0;
|
||||||
for (i = 0; (quirks_mode_blacklist[i]); i++) {
|
for (i = 0; (quirks_mode_blacklist[i]); i++) {
|
||||||
if (prefixmatch(c->app_name, quirks_mode_blacklist[i])) {
|
if (prefixmatch(c->app_name, quirks_mode_blacklist[i])) {
|
||||||
hlog(LOG_DEBUG, "%s/%s: Enabling quirks mode for application %s %s",
|
hlog(LOG_DEBUG, "%s/%s: Enabling quirks mode for application: %s %s",
|
||||||
c->addr_rem, c->username, c->app_name, c->app_version);
|
c->addr_rem, c->username, c->app_name, c->app_version);
|
||||||
c->quirks_mode = 1;
|
c->quirks_mode = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int login_setup_udp_feed(struct client_t *c, int port)
|
int login_setup_udp_feed(struct client_t *c, int port)
|
||||||
|
|
|
||||||
|
|
@ -121,6 +121,10 @@ static void process_outgoing_single(struct worker_t *self, struct pbuf_t *pb)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Do not send packets to clients which we've blacklisted as broken. */
|
||||||
|
if (c->no_tx)
|
||||||
|
continue;
|
||||||
|
|
||||||
send_single(self, c, pb->data, pb->packet_len);
|
send_single(self, c, pb->data, pb->packet_len);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2213,6 +2213,8 @@ static struct cJSON *worker_client_json(struct client_t *c, int liveup_info)
|
||||||
|
|
||||||
if (c->quirks_mode)
|
if (c->quirks_mode)
|
||||||
cJSON_AddNumberToObject(jc, "quirks_mode", c->quirks_mode);
|
cJSON_AddNumberToObject(jc, "quirks_mode", c->quirks_mode);
|
||||||
|
if (c->no_tx)
|
||||||
|
cJSON_AddNumberToObject(jc, "no_tx", c->no_tx);
|
||||||
|
|
||||||
json_add_rxerrs(jc, "rx_errs", c->localaccount.rxerrs);
|
json_add_rxerrs(jc, "rx_errs", c->localaccount.rxerrs);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -355,6 +355,7 @@ struct client_t {
|
||||||
char hidden; /* is the user on a hidden listener socket, not shown on status */
|
char hidden; /* is the user on a hidden listener socket, not shown on status */
|
||||||
char failed_cmds; /* how many login commands have failed */
|
char failed_cmds; /* how many login commands have failed */
|
||||||
char quirks_mode; /* is this a known buggy-and-unmaintained application on our blacklist */
|
char quirks_mode; /* is this a known buggy-and-unmaintained application on our blacklist */
|
||||||
|
char no_tx; /* is the TX igate implementation broken and on our blacklist */
|
||||||
char loc_known; /* have we received a position packet from this client */
|
char loc_known; /* have we received a position packet from this client */
|
||||||
|
|
||||||
/* the current handler function for incoming lines */
|
/* the current handler function for incoming lines */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue