Source-Changes-HG archive

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

[src/netbsd-7]: src/sys/arch/xen/xen Pull up the following revisions(s) (requ...



details:   https://anonhg.NetBSD.org/src/rev/436e729b590a
branches:  netbsd-7
changeset: 745925:436e729b590a
user:      sborrill <sborrill%NetBSD.org@localhost>
date:      Mon Mar 16 12:08:37 2020 +0000

description:
Pull up the following revisions(s) (requested by jdolecek in ticket #1726):
        sys/arch/xen/xen/xennet_checksum.c:     revision 1.4

Make the packet length check less strict, allow the physical packet longer
than IP payload. This fixes problem where checksum was not recomputed for
short packets coming from Windows domU on same physical host as it seems
Windows does some padding.

diffstat:

 sys/arch/xen/xen/xennet_checksum.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 161f738f4221 -r 436e729b590a sys/arch/xen/xen/xennet_checksum.c
--- a/sys/arch/xen/xen/xennet_checksum.c        Sun Mar 08 09:20:52 2020 +0000
+++ b/sys/arch/xen/xen/xennet_checksum.c        Mon Mar 16 12:08:37 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xennet_checksum.c,v 1.3 2007/11/22 16:17:10 bouyer Exp $       */
+/*     $NetBSD: xennet_checksum.c,v 1.3.80.1 2020/03/16 12:08:37 sborrill Exp $        */
 
 /*-
  * Copyright (c)2006 YAMAMOTO Takashi,
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xennet_checksum.c,v 1.3 2007/11/22 16:17:10 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xennet_checksum.c,v 1.3.80.1 2020/03/16 12:08:37 sborrill Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -124,7 +124,7 @@
        nxt = iph->ip_p;
        iphlen = iph->ip_hl * 4;
        iplen = ntohs(iph->ip_len);
-       if (ehlen + iplen != m->m_pkthdr.len) {
+       if (ehlen + iplen > m->m_pkthdr.len) {
                return EINVAL;
        }
        if (nxt == IPPROTO_UDP) {



Home | Main Index | Thread Index | Old Index