Module Name: src Committed By: rmind Date: Thu Mar 29 21:40:53 UTC 2018
Modified Files: src/sys/netinet: tcp_input.c Log Message: tcp_urp_drop: fix a bug introduced in 1.390 rev (hi maxv@). To generate a diff of this commit: cvs rdiff -u -r1.400 -r1.401 src/sys/netinet/tcp_input.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/netinet/tcp_input.c diff -u src/sys/netinet/tcp_input.c:1.400 src/sys/netinet/tcp_input.c:1.401 --- src/sys/netinet/tcp_input.c:1.400 Thu Mar 29 18:54:48 2018 +++ src/sys/netinet/tcp_input.c Thu Mar 29 21:40:53 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: tcp_input.c,v 1.400 2018/03/29 18:54:48 maxv Exp $ */ +/* $NetBSD: tcp_input.c,v 1.401 2018/03/29 21:40:53 rmind Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -148,7 +148,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: tcp_input.c,v 1.400 2018/03/29 18:54:48 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tcp_input.c,v 1.401 2018/03/29 21:40:53 rmind Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -340,7 +340,7 @@ tcp_fields_to_net(struct tcphdr *th) static void tcp_urp_drop(struct tcphdr *th, int todrop, int *tiflags) { - if (th->th_urp > 1) { + if (th->th_urp > todrop) { th->th_urp -= todrop; } else { *tiflags &= ~TH_URG;