Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/xen/xen return EOPNOTSUPP for unknown IP protocol (...



details:   https://anonhg.NetBSD.org/src/rev/fbd61e301521
branches:  trunk
changeset: 932261:fbd61e301521
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Sun May 03 16:10:26 2020 +0000

description:
return EOPNOTSUPP for unknown IP protocol (same as unknown ethernet type),
so that EINVAL is returned only when the packet is too short

diffstat:

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

diffs (27 lines):

diff -r 3589db3fa5ad -r fbd61e301521 sys/arch/xen/xen/xennet_checksum.c
--- a/sys/arch/xen/xen/xennet_checksum.c        Sun May 03 15:29:22 2020 +0000
+++ b/sys/arch/xen/xen/xennet_checksum.c        Sun May 03 16:10:26 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xennet_checksum.c,v 1.12 2020/05/01 19:53:17 jdolecek Exp $    */
+/*     $NetBSD: xennet_checksum.c,v 1.13 2020/05/03 16:10:26 jdolecek Exp $    */
 
 /*-
  * Copyright (c)2006 YAMAMOTO Takashi,
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xennet_checksum.c,v 1.12 2020/05/01 19:53:17 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xennet_checksum.c,v 1.13 2020/05/03 16:10:26 jdolecek Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -186,7 +186,7 @@
                        printf("%s: unknown proto %d passed no checksum\n",
                            ifp->if_xname, nxt);
 #endif /* XENNET_DEBUG */
-               error = EINVAL;
+               error = EOPNOTSUPP;
                goto out;
            }
        }



Home | Main Index | Thread Index | Old Index