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

实现多网卡自动切换功能 #2628

Merged
merged 4 commits into from
May 1, 2019
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Update sal_socket.c
创建sock时,默认网卡联网时才优先使用
  • Loading branch information
HubertXie committed Apr 28, 2019
commit f7e5f4cd5005df03a959372defda0ce12985d504
2 changes: 1 addition & 1 deletion components/net/sal_socket/src/sal_socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ static int socket_init(int family, int type, int protocol, struct sal_socket **r
return -3;
}

if (netdev_is_up(netdv_def))
if (netdev_is_up(netdv_def)&&netdev_is_link_up(netdv_def))
{
/* check default network interface device protocol family */
pf = (struct sal_proto_family *) netdv_def->sal_user_data;
Expand Down