-/* $OpenBSD: uipc_socket.c,v 1.185 2017/05/27 18:50:53 claudio Exp $ */
+/* $OpenBSD: uipc_socket.c,v 1.186 2017/05/31 08:55:10 markus Exp $ */
/* $NetBSD: uipc_socket.c,v 1.21 1996/02/04 02:17:52 christos Exp $ */
/*
s = solock(so);
if (resid == 0)
so->so_state &= ~SS_ISSENDING;
+ if (top && so->so_options & SO_ZEROIZE)
+ top->m_flags |= M_ZEROIZE;
error = (*so->so_proto->pr_usrreq)(so,
(flags & MSG_OOB) ? PRU_SENDOOB : PRU_SEND,
top, addr, control, curproc);
case SO_REUSEPORT:
case SO_OOBINLINE:
case SO_TIMESTAMP:
+ case SO_ZEROIZE:
if (m == NULL || m->m_len < sizeof (int)) {
error = EINVAL;
goto bad;
case SO_BROADCAST:
case SO_OOBINLINE:
case SO_TIMESTAMP:
+ case SO_ZEROIZE:
*mtod(m, int *) = so->so_options & optname;
break;
-/* $OpenBSD: socket.h,v 1.94 2017/05/04 15:00:24 bluhm Exp $ */
+/* $OpenBSD: socket.h,v 1.95 2017/05/31 08:55:10 markus Exp $ */
/* $NetBSD: socket.h,v 1.14 1996/02/09 18:25:36 christos Exp $ */
/*
#define SO_REUSEPORT 0x0200 /* allow local address & port reuse */
#define SO_TIMESTAMP 0x0800 /* timestamp received dgram traffic */
#define SO_BINDANY 0x1000 /* allow bind to any address */
+#define SO_ZEROIZE 0x2000 /* zero out all mbufs sent over socket */
/*
* Additional options, not kept in so_options.