Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[components][sal]delay getting sal_proto_family in sal_ioctlsocket #9429

Merged
merged 1 commit into from
Sep 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions components/net/sal/src/sal_socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -1171,12 +1171,9 @@ int sal_ioctlsocket(int socket, long cmd, void *arg)
/* get the socket object by socket descriptor */
SAL_SOCKET_OBJ_GET(sock, socket);

/* check the network interface socket opreation */
SAL_NETDEV_SOCKETOPS_VALID(sock->netdev, pf, ioctlsocket);

struct sal_ifreq *ifr = (struct sal_ifreq *)arg;

if((sock->domain == AF_INET)&&(sock->netdev)&&(ifr != RT_NULL))
if (ifr != RT_NULL)
{
switch (cmd)
{
Expand Down Expand Up @@ -1478,6 +1475,10 @@ int sal_ioctlsocket(int socket, long cmd, void *arg)
break;
}
}

/* check the network interface socket opreation */
SAL_NETDEV_SOCKETOPS_VALID(sock->netdev, pf, ioctlsocket);

return pf->skt_ops->ioctlsocket((int)(size_t)sock->user_data, cmd, arg);
}

Expand Down
Loading