Source-Changes-HG archive

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

[src/netbsd-6]: src/sys/net/npf Pull up following revision(s) (requested by r...



details:   https://anonhg.NetBSD.org/src/rev/e64cada731e3
branches:  netbsd-6
changeset: 774604:e64cada731e3
user:      riz <riz%NetBSD.org@localhost>
date:      Thu Sep 13 22:33:05 2012 +0000

description:
Pull up following revision(s) (requested by rmind in ticket #555):
        sys/net/npf/npf_alg_icmp.c: revision 1.12
npf_icmp_uniqid: inspect the correct npc_info for IPv4/v6.

diffstat:

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

diffs (54 lines):

diff -r a5f73345b2ac -r e64cada731e3 sys/net/npf/npf_alg_icmp.c
--- a/sys/net/npf/npf_alg_icmp.c        Thu Sep 13 22:31:03 2012 +0000
+++ b/sys/net/npf/npf_alg_icmp.c        Thu Sep 13 22:33:05 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: npf_alg_icmp.c,v 1.8.4.3 2012/07/25 20:45:23 jdc Exp $ */
+/*     $NetBSD: npf_alg_icmp.c,v 1.8.4.4 2012/09/13 22:33:05 riz Exp $ */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: npf_alg_icmp.c,v 1.8.4.3 2012/07/25 20:45:23 jdc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: npf_alg_icmp.c,v 1.8.4.4 2012/09/13 22:33:05 riz Exp $");
 
 #include <sys/param.h>
 #include <sys/module.h>
@@ -155,13 +155,14 @@
  * or TCP/UDP ports of the original packet, which is embedded.
  */
 static bool
-npf_icmp_uniqid(const int type, npf_cache_t *npc, nbuf_t *nbuf, void *n_ptr)
+npf_icmp_uniqid(const int npcinf, const int type,
+    npf_cache_t *npc, nbuf_t *nbuf, void *n_ptr)
 {
        struct icmp      *ic;
        struct icmp6_hdr *ic6;
        u_int            offby;
 
-       if (npf_iscached(npc, NPC_IP4)) {
+       if (npcinf & NPC_IP4) {
                /* Per RFC 792. */
                switch (type) {
                case ICMP_UNREACH:
@@ -209,7 +210,7 @@
                /* No unique IDs. */
                return false;
        }
-       if (npf_iscached(npc, NPC_IP6)) {
+       if (npcinf & NPC_IP6) {
                switch (type) {
                /* Per RFC 4443. */
                case ICMP6_DST_UNREACH:
@@ -307,7 +308,8 @@
 
        /* Fetch relevant data into the separate ("key") cache. */
        struct icmp *ic = &npc->npc_l4.icmp;
-       if (!npf_icmp_uniqid(ic->icmp_type, key, nbuf, n_ptr)) {
+       if (!npf_icmp_uniqid(npc->npc_info & NPC_IP46, ic->icmp_type,
+           key, nbuf, n_ptr)) {
                return false;
        }
 



Home | Main Index | Thread Index | Old Index