Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/net Send echo request even while user data is received



details:   https://anonhg.NetBSD.org/src/rev/f17345fe86dd
branches:  trunk
changeset: 1021174:f17345fe86dd
user:      yamaguchi <yamaguchi%NetBSD.org@localhost>
date:      Fri May 14 08:11:08 2021 +0000

description:
Send echo request even while user data is received
if pp_max_noreceive is 0

diffstat:

 sys/net/if_spppsubr.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 83e1257950f3 -r f17345fe86dd sys/net/if_spppsubr.c
--- a/sys/net/if_spppsubr.c     Fri May 14 08:06:32 2021 +0000
+++ b/sys/net/if_spppsubr.c     Fri May 14 08:11:08 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_spppsubr.c,v 1.238 2021/05/14 08:06:32 yamaguchi Exp $       */
+/*     $NetBSD: if_spppsubr.c,v 1.239 2021/05/14 08:11:08 yamaguchi Exp $       */
 
 /*
  * Synchronous PPP/Cisco link level subroutines.
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_spppsubr.c,v 1.238 2021/05/14 08:06:32 yamaguchi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_spppsubr.c,v 1.239 2021/05/14 08:11:08 yamaguchi Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_inet.h"
@@ -5626,7 +5626,8 @@
                }
 
                /* No echo reply, but maybe user data passed through? */
-               if ((now - sp->pp_last_receive) < sp->pp_max_noreceive) {
+               if (sp->pp_max_noreceive != 0 &&
+                   (now - sp->pp_last_receive) < sp->pp_max_noreceive) {
                        sp->pp_alivecnt = 0;
                        SPPP_UNLOCK(sp);
                        continue;



Home | Main Index | Thread Index | Old Index