Source-Changes-HG archive

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

[src/trunk]: src/sys/net/npf Remove dead branches, 'npc' can't be NULL (and i...



details:   https://anonhg.NetBSD.org/src/rev/38587040824c
branches:  trunk
changeset: 321343:38587040824c
user:      maxv <maxv%NetBSD.org@localhost>
date:      Mon Mar 12 12:45:26 2018 +0000

description:
Remove dead branches, 'npc' can't be NULL (and it is dereferenced
earlier).

diffstat:

 sys/net/npf/npf_alg_icmp.c |  10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)

diffs (38 lines):

diff -r aa215affa2d8 -r 38587040824c sys/net/npf/npf_alg_icmp.c
--- a/sys/net/npf/npf_alg_icmp.c        Mon Mar 12 11:56:34 2018 +0000
+++ b/sys/net/npf/npf_alg_icmp.c        Mon Mar 12 12:45:26 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: npf_alg_icmp.c,v 1.25 2017/12/10 00:07:36 rmind Exp $  */
+/*     $NetBSD: npf_alg_icmp.c,v 1.26 2018/03/12 12:45:26 maxv Exp $   */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
 
 #ifdef _KERNEL
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: npf_alg_icmp.c,v 1.25 2017/12/10 00:07:36 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: npf_alg_icmp.c,v 1.26 2018/03/12 12:45:26 maxv Exp $");
 
 #include <sys/param.h>
 #include <sys/module.h>
@@ -135,9 +135,6 @@
        case ICMP_REDIRECT:
        case ICMP_TIMXCEED:
        case ICMP_PARAMPROB:
-               if (npc == NULL) {
-                       return false;
-               }
                /* Should contain original IP header. */
                if (!nbuf_advance(nbuf, offsetof(struct icmp, icmp_ip), 0)) {
                        return false;
@@ -175,9 +172,6 @@
        case ICMP6_PACKET_TOO_BIG:
        case ICMP6_TIME_EXCEEDED:
        case ICMP6_PARAM_PROB:
-               if (npc == NULL) {
-                       return false;
-               }
                /* Should contain original IP header. */
                if (!nbuf_advance(nbuf, sizeof(struct icmp6_hdr), 0)) {
                        return false;



Home | Main Index | Thread Index | Old Index