From acdabb990b5e13428554427f0fc556bde7755ffa Mon Sep 17 00:00:00 2001 From: ozaki-r Date: Thu, 25 May 2017 04:45:59 +0000 Subject: [PATCH] Support SO_OVERFLOWED on PF_KEY sockets The original author is hsuenaga@IIJ --- sys/netipsec/keysock.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/netipsec/keysock.c b/sys/netipsec/keysock.c index 4cfa60609ffc..d74ad1078b73 100644 --- a/sys/netipsec/keysock.c +++ b/sys/netipsec/keysock.c @@ -1,4 +1,4 @@ -/* $NetBSD: keysock.c,v 1.57 2017/05/25 04:35:02 ozaki-r Exp $ */ +/* $NetBSD: keysock.c,v 1.58 2017/05/25 04:45:59 ozaki-r Exp $ */ /* $FreeBSD: src/sys/netipsec/keysock.c,v 1.3.2.1 2003/01/24 05:11:36 sam Exp $ */ /* $KAME: keysock.c,v 1.25 2001/08/13 20:07:41 itojun Exp $ */ @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: keysock.c,v 1.57 2017/05/25 04:35:02 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: keysock.c,v 1.58 2017/05/25 04:45:59 ozaki-r Exp $"); /* This code has derived from sys/net/rtsock.c on FreeBSD2.2.5 */ @@ -191,6 +191,7 @@ key_sendup0( PFKEY_STATINC(PFKEY_STAT_IN_NOMEM); m_freem(m); error = ENOBUFS; + rp->rcb_socket->so_rcv.sb_overflowed++; } else error = 0; sorwakeup(rp->rcb_socket);