Source-Changes-HG archive

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

[src/trunk]: src/sys/net If the in6 domain was not attached, do not attempt t...



details:   https://anonhg.NetBSD.org/src/rev/5a0c4c5a04a0
branches:  trunk
changeset: 327022:5a0c4c5a04a0
user:      pooka <pooka%NetBSD.org@localhost>
date:      Tue Feb 25 22:42:06 2014 +0000

description:
If the in6 domain was not attached, do not attempt to process IPv6 packets.

diffstat:

 sys/net/if_ethersubr.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (29 lines):

diff -r 8143f0c2fb66 -r 5a0c4c5a04a0 sys/net/if_ethersubr.c
--- a/sys/net/if_ethersubr.c    Tue Feb 25 22:40:53 2014 +0000
+++ b/sys/net/if_ethersubr.c    Tue Feb 25 22:42:06 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_ethersubr.c,v 1.195 2013/06/29 21:06:58 rmind Exp $ */
+/*     $NetBSD: if_ethersubr.c,v 1.196 2014/02/25 22:42:06 pooka Exp $ */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,7 +61,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.195 2013/06/29 21:06:58 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.196 2014/02/25 22:42:06 pooka Exp $");
 
 #include "opt_inet.h"
 #include "opt_atalk.h"
@@ -852,6 +852,10 @@
 #endif
 #ifdef INET6
                case ETHERTYPE_IPV6:
+                       if (__predict_false(!in6_present)) {
+                               m_freem(m);
+                               return;
+                       }
 #ifdef GATEWAY  
                        if (ip6flow_fastforward(&m))
                                return;



Home | Main Index | Thread Index | Old Index