version 1.160.2.4, 2010/03/11 15:04:20 |
version 1.201.2.1, 2011/06/06 09:09:39 |
Line 98 __KERNEL_RCSID(0, "$NetBSD$"); |
|
Line 98 __KERNEL_RCSID(0, "$NetBSD$"); |
|
#include <compat/sys/socket.h> |
#include <compat/sys/socket.h> |
#endif |
#endif |
|
|
#include <uvm/uvm.h> |
#include <uvm/uvm_extern.h> |
|
#include <uvm/uvm_loan.h> |
|
#include <uvm/uvm_page.h> |
|
|
MALLOC_DEFINE(M_SOOPTS, "soopts", "socket options"); |
MALLOC_DEFINE(M_SOOPTS, "soopts", "socket options"); |
MALLOC_DEFINE(M_SONAME, "soname", "socket name"); |
MALLOC_DEFINE(M_SONAME, "soname", "socket name"); |
Line 461 socket_listener_cb(kauth_cred_t cred, ka |
|
Line 463 socket_listener_cb(kauth_cred_t cred, ka |
|
|
|
case KAUTH_REQ_NETWORK_SOCKET_OPEN: |
case KAUTH_REQ_NETWORK_SOCKET_OPEN: |
/* We allow "raw" routing/bluetooth sockets to anyone. */ |
/* We allow "raw" routing/bluetooth sockets to anyone. */ |
if ((u_long)arg1 == PF_ROUTE || (u_long)arg1 == PF_BLUETOOTH) |
if ((u_long)arg1 == PF_ROUTE || (u_long)arg1 == PF_OROUTE |
|
|| (u_long)arg1 == PF_BLUETOOTH) { |
result = KAUTH_RESULT_ALLOW; |
result = KAUTH_RESULT_ALLOW; |
else { |
} else { |
/* Privileged, let secmodel handle this. */ |
/* Privileged, let secmodel handle this. */ |
if ((u_long)arg2 == SOCK_RAW) |
if ((u_long)arg2 == SOCK_RAW) |
break; |
break; |
Line 1022 sosend(struct socket *so, struct mbuf *a |
|
Line 1025 sosend(struct socket *so, struct mbuf *a |
|
} |
} |
if (resid >= MINCLSIZE && space >= MCLBYTES) { |
if (resid >= MINCLSIZE && space >= MCLBYTES) { |
SOSEND_COUNTER_INCR(&sosend_copy_big); |
SOSEND_COUNTER_INCR(&sosend_copy_big); |
m_clget(m, M_WAIT); |
m_clget(m, M_DONTWAIT); |
if ((m->m_flags & M_EXT) == 0) |
if ((m->m_flags & M_EXT) == 0) |
goto nopages; |
goto nopages; |
mlen = MCLBYTES; |
mlen = MCLBYTES; |