!6 【轻量级 PR】:no check net capability for binding ANY_addr

Merge pull request !6 from Caoruihong/N/A
This commit is contained in:
Caoruihong 2020-09-14 23:55:31 +08:00 committed by openharmony_ci
parent 9c10570033
commit c9b9d19b6f
1 changed files with 0 additions and 6 deletions

View File

@ -216,12 +216,6 @@ static int lwip_bind_wrap(int s, const struct sockaddr *name, socklen_t namelen)
LWIP_ERROR("permission deny: NET_BIND_SERVICE\n", IsCapPermit(CAP_NET_BIND_SERVICE),
set_errno(EPERM); return -1);
}
if (ip_addr_isany(&ipaddr)) {
LWIP_ERROR("permission deny: NET_RAW\n", IsCapPermit(CAP_NET_RAW),
set_errno(EPERM); return -1);
LWIP_ERROR("permission deny: NET_ADMIN\n", IsCapPermit(CAP_NET_ADMIN),
set_errno(EPERM); return -1);
}
if (ip_addr_ismulticast(&ipaddr) || ip_addr_isbroadcast_bysock(&ipaddr, s)) {
LWIP_ERROR("permission deny: NET_BROADCAST\n", IsCapPermit(CAP_NET_BROADCAST),
set_errno(EPERM); return -1);