8320168: handle setsocktopt return values

Reviewed-by: lucy, alanb, vtewari
This commit is contained in:
Matthias Baesken 2023-11-20 11:28:41 +00:00
parent 6c5e15c1a2
commit db1d82347b
8 changed files with 53 additions and 15 deletions

View file

@ -536,7 +536,9 @@ NET_SetSockOpt(int fd, int level, int opt, const void *arg,
}
if (sotype == SOCK_DGRAM) {
setsockopt(fd, level, SO_REUSEPORT, arg, len);
if (setsockopt(fd, level, SO_REUSEPORT, arg, len) < 0) {
return -1;
}
}
}
#endif