Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netinet Fix the assert in the previous commit.
details: https://anonhg.NetBSD.org/src/rev/b4bf9cf4ed5f
branches: trunk
changeset: 329396:b4bf9cf4ed5f
user: rmind <rmind%NetBSD.org@localhost>
date: Fri May 23 00:02:14 2014 +0000
description:
Fix the assert in the previous commit.
diffstat:
sys/netinet/ip_output.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diffs (38 lines):
diff -r 362367b850a8 -r b4bf9cf4ed5f sys/netinet/ip_output.c
--- a/sys/netinet/ip_output.c Thu May 22 23:42:53 2014 +0000
+++ b/sys/netinet/ip_output.c Fri May 23 00:02:14 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ip_output.c,v 1.226 2014/05/22 23:42:53 rmind Exp $ */
+/* $NetBSD: ip_output.c,v 1.227 2014/05/23 00:02:14 rmind Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -91,7 +91,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_output.c,v 1.226 2014/05/22 23:42:53 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_output.c,v 1.227 2014/05/23 00:02:14 rmind Exp $");
#include "opt_inet.h"
#include "opt_ipsec.h"
@@ -191,7 +191,6 @@
MCLAIM(m, &ip_tx_mowner);
- KASSERT(solocked(so));
KASSERT((m->m_flags & M_PKTHDR) != 0);
KASSERT((m->m_pkthdr.csum_flags & (M_CSUM_TCPv6|M_CSUM_UDPv6)) == 0);
KASSERT((m->m_pkthdr.csum_flags & (M_CSUM_TCPv4|M_CSUM_UDPv4)) !=
@@ -571,7 +570,10 @@
*/
if (ntohs(ip->ip_off) & IP_DF) {
if (flags & IP_RETURNMTU) {
- struct inpcb *inp = sotoinpcb(so);
+ struct inpcb *inp;
+
+ KASSERT(so && solocked(so));
+ inp = sotoinpcb(so);
inp->inp_errormtu = mtu;
}
error = EMSGSIZE;
Home |
Main Index |
Thread Index |
Old Index