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:
parent
7172863a1a
commit
fbefda6103
1 changed files with 4 additions and 0 deletions
|
@ -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) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue