Avoid connecting to APRS-IS via UDP

Avoid connecting to APRS-IS via UDP by filtering out getaddrinfo()
results of SOCK_DGRAM type
This commit is contained in:
XANTRONIX Development 2020-09-22 11:45:22 -04:00 committed by XANTRONIX Industrial
parent 7172863a1a
commit fbefda6103

View file

@ -89,6 +89,10 @@ static int aprs_is_connect(patty_ax25_aprs_is *aprs,
} }
for (ai=ai0; ai; ai=ai->ai_next) { for (ai=ai0; ai; ai=ai->ai_next) {
if (ai->ai_socktype == SOCK_DGRAM) {
continue;
}
if ((aprs->fd = socket(ai->ai_family, if ((aprs->fd = socket(ai->ai_family,
ai->ai_socktype, ai->ai_socktype,
ai->ai_protocol)) < 0) { ai->ai_protocol)) < 0) {