Source-Changes-HG archive

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

[src/netbsd-7]: src/sys/external/bsd/ipf/netinet Pull up following revision(s...



details:   https://anonhg.NetBSD.org/src/rev/4d3bf34ab8ce
branches:  netbsd-7
changeset: 799889:4d3bf34ab8ce
user:      snj <snj%NetBSD.org@localhost>
date:      Fri Apr 29 18:58:17 2016 +0000

description:
Pull up following revision(s) (requested by khorben in ticket #1148):
        sys/external/bsd/ipf/netinet/ip_nat.c: revision 1.16
Fix matching of ICMP queries when NAT'd through IPF
This notably fixes MTU updates for hosts issueing ICMP queries through a
NAT performed by NetBSD with IPF.

diffstat:

 sys/external/bsd/ipf/netinet/ip_nat.c |  23 ++++++++---------------
 1 files changed, 8 insertions(+), 15 deletions(-)

diffs (60 lines):

diff -r 02ab6b30c5b3 -r 4d3bf34ab8ce sys/external/bsd/ipf/netinet/ip_nat.c
--- a/sys/external/bsd/ipf/netinet/ip_nat.c     Fri Apr 29 18:54:49 2016 +0000
+++ b/sys/external/bsd/ipf/netinet/ip_nat.c     Fri Apr 29 18:58:17 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ip_nat.c,v 1.13.2.1 2015/08/08 10:09:57 martin Exp $   */
+/*     $NetBSD: ip_nat.c,v 1.13.2.2 2016/04/29 18:58:17 snj Exp $      */
 
 /*
  * Copyright (C) 2012 by Darren Reed.
@@ -113,7 +113,7 @@
 #if !defined(lint)
 #if defined(__NetBSD__)
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_nat.c,v 1.13.2.1 2015/08/08 10:09:57 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_nat.c,v 1.13.2.2 2016/04/29 18:58:17 snj Exp $");
 #else
 static const char sccsid[] = "@(#)ip_nat.c     1.11 6/5/96 (C) 1995 Darren Reed";
 static const char rcsid[] = "@(#)Id: ip_nat.c,v 1.1.1.2 2012/07/22 13:45:27 darrenr Exp";
@@ -4032,13 +4032,8 @@
                dport = htons(fin->fin_data[1]);
                break;
        case IPPROTO_ICMP :
-               if (flags & IPN_ICMPERR) {
-                       sport = fin->fin_data[1];
-                       dport = 0;
-               } else {
-                       dport = fin->fin_data[1];
-                       sport = 0;
-               }
+               sport = 0;
+               dport = fin->fin_data[1];
                break;
        default :
                sport = 0;
@@ -4353,8 +4348,6 @@
        u_int hv;
 
        ifp = fin->fin_ifp;
-       sport = 0;
-       dport = 0;
 
        switch (p)
        {
@@ -4364,12 +4357,12 @@
                dport = htons(fin->fin_data[1]);
                break;
        case IPPROTO_ICMP :
-               if (flags & IPN_ICMPERR)
-                       sport = fin->fin_data[1];
-               else
-                       dport = fin->fin_data[1];
+               sport = 0;
+               dport = fin->fin_data[1];
                break;
        default :
+               sport = 0;
+               dport = 0;
                break;
        }
 



Home | Main Index | Thread Index | Old Index