Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-8]: src/sys/net Pull up the following revisions, requested by msa...
details: https://anonhg.NetBSD.org/src/rev/b8a699d92e3b
branches: netbsd-8
changeset: 461067:b8a699d92e3b
user: martin <martin%NetBSD.org@localhost>
date: Thu Nov 14 16:00:51 2019 +0000
description:
Pull up the following revisions, requested by msaitoh in ticket #1438:
sys/net/if_loop.c 1.108-1.109 via patch
Fix a bug that an IP broadcast packet back to myself
is dropped as bad checksum when an interface's checksum
offload is set.
diffstat:
sys/net/if_loop.c | 18 ++++++++++++++----
1 files changed, 14 insertions(+), 4 deletions(-)
diffs (48 lines):
diff -r b32039282785 -r b8a699d92e3b sys/net/if_loop.c
--- a/sys/net/if_loop.c Thu Nov 14 15:58:06 2019 +0000
+++ b/sys/net/if_loop.c Thu Nov 14 16:00:51 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_loop.c,v 1.94.6.4 2018/01/02 10:20:33 snj Exp $ */
+/* $NetBSD: if_loop.c,v 1.94.6.5 2019/11/14 16:00:51 martin Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -65,7 +65,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_loop.c,v 1.94.6.4 2018/01/02 10:20:33 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_loop.c,v 1.94.6.5 2019/11/14 16:00:51 martin Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -320,8 +320,13 @@
KASSERT((csum_flags & ~(M_CSUM_IPv4|M_CSUM_UDPv4)) == 0);
if (csum_flags != 0 && IN_LOOPBACK_NEED_CHECKSUM(csum_flags)) {
ip_undefer_csum(m, 0, csum_flags);
+ m->m_pkthdr.csum_flags = 0;
+ } else {
+ /*
+ * Do nothing. Pass M_CSUM_IPv4 and M_CSUM_UDPv4 as
+ * they are to tell those are calculated and good.
+ */
}
- m->m_pkthdr.csum_flags = 0;
pktq = ip_pktq;
break;
#endif
@@ -332,8 +337,13 @@
if (csum_flags != 0 &&
IN6_LOOPBACK_NEED_CHECKSUM(csum_flags)) {
ip6_undefer_csum(m, 0, csum_flags);
+ m->m_pkthdr.csum_flags = 0;
+ } else {
+ /*
+ * Do nothing. Pass M_CSUM_UDPv6 as
+ * they are to tell those are calculated and good.
+ */
}
- m->m_pkthdr.csum_flags = 0;
m->m_flags |= M_LOOP;
pktq = ip6_pktq;
break;
Home |
Main Index |
Thread Index |
Old Index