From 4dd7e9f8160ee870fd666a06274f21e4596abaed Mon Sep 17 00:00:00 2001 From: Nate Karstens Date: Wed, 10 May 2023 09:58:30 -0500 Subject: [PATCH] Use macros in setsockopt handling of IP_PKTINFO Changes setsockopt handling of IP_PKTINFO to use the provided macros. --- src/api/sockets.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/sockets.c b/src/api/sockets.c index 52251802..425c0231 100644 --- a/src/api/sockets.c +++ b/src/api/sockets.c @@ -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 */