6787347 dgram_peek sotest fails with unexpected result
6787350 udp_send_zero sotest fails with unexpected result
6787381 SO_POLLEV_ALWAYS flag not inherited from listener
diff --git a/usr/src/uts/common/fs/sockfs/sockcommon_subr.c b/usr/src/uts/common/fs/sockfs/sockcommon_subr.c
index 3b91b6f..69e2562 100644
--- a/usr/src/uts/common/fs/sockfs/sockcommon_subr.c
+++ b/usr/src/uts/common/fs/sockfs/sockcommon_subr.c
@@ -835,7 +835,8 @@
 		if (mp != NULL) { /* more data blocks in msg */
 			more |= MOREDATA;
 			if ((flags & (MSG_PEEK|MSG_TRUNC))) {
-				if (flags & MSG_TRUNC) {
+				if (flags & MSG_TRUNC &&
+				    ((flags & MSG_PEEK) == 0)) {
 					mutex_enter(&so->so_lock);
 					so->so_rcv_queued -= msgdsize(mp);
 					mutex_exit(&so->so_lock);
@@ -1266,6 +1267,7 @@
 		    SO_OOBINLINE|SO_DGRAM_ERRIND|SO_LINGER);
 		so->so_proto_props = pso->so_proto_props;
 		so->so_mode = pso->so_mode;
+		so->so_pollev = pso->so_pollev & SO_POLLEV_ALWAYS;
 
 		mutex_exit(&pso->so_lock);