Skip to content

Commit 9752dd7

Browse files
committed
[net][sal] Delete the judgment of the default network interface device when socket is created
Signed-off-by: chenyong <[email protected]>
1 parent c2244a5 commit 9752dd7

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

components/net/sal_socket/src/sal_socket.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -387,14 +387,7 @@ static int socket_init(int family, int type, int protocol, struct sal_socket **r
387387
sock->type = type;
388388
sock->protocol = protocol;
389389

390-
/* get socket operations from network interface device */
391-
if (netdv_def == RT_NULL)
392-
{
393-
LOG_E("not find default network interface device for socket create.");
394-
return -3;
395-
}
396-
397-
if (netdev_is_up(netdv_def) && netdev_is_link_up(netdv_def))
390+
if (netdv_def && netdev_is_up(netdv_def) && netdev_is_link_up(netdv_def))
398391
{
399392
/* check default network interface device protocol family */
400393
pf = (struct sal_proto_family *) netdv_def->sal_user_data;

0 commit comments

Comments
 (0)