mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-05 22:29:49 +00:00
Use macros in setsockopt handling of IP_PKTINFO
Changes setsockopt handling of IP_PKTINFO to use the provided macros.
This commit is contained in:
parent
147809861a
commit
4dd7e9f816
@ -3541,9 +3541,9 @@ lwip_setsockopt_impl(int s, int level, int optname, const void *optval, socklen_
|
||||
case IP_PKTINFO:
|
||||
LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB_TYPE(sock, optlen, int, NETCONN_UDP);
|
||||
if (*(const int *)optval) {
|
||||
sock->conn->flags |= NETCONN_FLAG_PKTINFO;
|
||||
netconn_set_flags(sock->conn, NETCONN_FLAG_PKTINFO);
|
||||
} else {
|
||||
sock->conn->flags &= ~NETCONN_FLAG_PKTINFO;
|
||||
netconn_clear_flags(sock->conn, NETCONN_FLAG_PKTINFO);
|
||||
}
|
||||
break;
|
||||
#endif /* LWIP_NETBUF_RECVINFO */
|
||||
|
Loading…
Reference in New Issue
Block a user