Source-Changes-HG archive

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

[src/trunk]: src/sys/netinet add an DIAGNOSTIC case for MCLBYTES assumption



details:   https://anonhg.NetBSD.org/src/rev/8fd62fa3e1fb
branches:  trunk
changeset: 495142:8fd62fa3e1fb
user:      itojun <itojun%NetBSD.org@localhost>
date:      Sun Jul 23 05:00:01 2000 +0000

description:
add an DIAGNOSTIC case for MCLBYTES assumption

diffstat:

 sys/netinet/tcp_input.c |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diffs (20 lines):

diff -r 23d89780c772 -r 8fd62fa3e1fb sys/netinet/tcp_input.c
--- a/sys/netinet/tcp_input.c   Sun Jul 23 00:18:24 2000 +0000
+++ b/sys/netinet/tcp_input.c   Sun Jul 23 05:00:01 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tcp_input.c,v 1.113 2000/07/09 12:49:08 itojun Exp $   */
+/*     $NetBSD: tcp_input.c,v 1.114 2000/07/23 05:00:01 itojun Exp $   */
 
 /*
 %%% portions-copyright-nrl-95
@@ -3360,6 +3360,10 @@
         */
        if (m)
                m_freem(m);
+#ifdef DIAGNOSTIC
+       if (max_linkhdr + tlen > MCLBYTES)
+               return (ENOBUFS);
+#endif
        MGETHDR(m, M_DONTWAIT, MT_DATA);
        if (m && tlen > MHLEN) {
                MCLGET(m, M_DONTWAIT);



Home | Main Index | Thread Index | Old Index