mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-02 17:28:30 +00:00
Add .PLEDGE/.CPU/.MEMORY/etc. to Landlock Make 1.2
This commit is contained in:
parent
6c0bbfac4a
commit
7ab15e0b23
20 changed files with 494 additions and 329 deletions
|
@ -158,7 +158,7 @@ static bool IsSockaddrAllowed(struct sockaddr_storage *addr) {
|
|||
}
|
||||
if (addr->ss_family == AF_INET) {
|
||||
ip = ntohl(((struct sockaddr_in *)addr)->sin_addr.s_addr);
|
||||
if (!IsPublicIp(ip)) {
|
||||
if (IsPrivateIp(ip) || IsLoopbackIp(ip)) {
|
||||
return true;
|
||||
} else {
|
||||
kprintf("warning: attempted to communicate with public ip "
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue