Source-Changes-HG archive

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

[src/netbsd-3]: src Pull up revision 1.6 (requested by martti in ticket #106):



details:   https://anonhg.NetBSD.org/src/rev/00cfb0460a1f
branches:  netbsd-3
changeset: 575109:00cfb0460a1f
user:      tron <tron%NetBSD.org@localhost>
date:      Mon Apr 04 18:25:44 2005 +0000

description:
Pull up revision 1.6 (requested by martti in ticket #106):
Upgraded IPFilter to 4.1.8

diffstat:

 dist/ipf/samples/proxy.c        |   4 ++--
 dist/ipf/tools/ipfs.c           |  21 +++++++--------------
 sys/dist/ipf/netinet/ip_proxy.c |   6 +++---
 3 files changed, 12 insertions(+), 19 deletions(-)

diffs (95 lines):

diff -r 06e9a69ce18b -r 00cfb0460a1f dist/ipf/samples/proxy.c
--- a/dist/ipf/samples/proxy.c  Mon Apr 04 18:25:38 2005 +0000
+++ b/dist/ipf/samples/proxy.c  Mon Apr 04 18:25:44 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: proxy.c,v 1.5 2005/02/19 21:30:25 martti Exp $ */
+/*     $NetBSD: proxy.c,v 1.5.2.1 2005/04/04 18:25:44 tron Exp $       */
 
 /*
  * Sample transparent proxy program.
@@ -101,7 +101,7 @@
         * Open the NAT device and lookup the mapping pair.
         */
        fd = open(IPNAT_NAME, O_RDONLY);
-       if (ioctl(fd, SIOCGNATL, &natlookp) == -1) {
+       if (ioctl(fd, SIOCGNATL, &obj) == -1) {
                perror("ioctl(SIOCGNATL)");
                exit(-1);
        }
diff -r 06e9a69ce18b -r 00cfb0460a1f dist/ipf/tools/ipfs.c
--- a/dist/ipf/tools/ipfs.c     Mon Apr 04 18:25:38 2005 +0000
+++ b/dist/ipf/tools/ipfs.c     Mon Apr 04 18:25:44 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ipfs.c,v 1.5 2005/02/08 07:01:54 martti Exp $  */
+/*     $NetBSD: ipfs.c,v 1.5.2.1 2005/04/04 18:25:44 tron Exp $        */
 
 /*
  * Copyright (C) 1999-2001, 2003 by Darren Reed.
@@ -587,16 +587,12 @@
                        return 1;
                }
 
-               if (ipn.ipn_dsize > 0) {
-                       n = ipn.ipn_dsize;
+               in = (nat_save_t *)malloc(ipn.ipn_dsize);
+               if (!in)
+                       break;
 
-                       if (n > sizeof(ipn.ipn_data))
-                               n -= sizeof(ipn.ipn_data);
-                       else
-                               n = 0;
-                       in = malloc(sizeof(*in) + n);
-                       if (!in)
-                               break;
+               if (ipn.ipn_dsize > sizeof(ipn)) {
+                       n = ipn.ipn_dsize - sizeof(ipn);
                        if (n > 0) {
                                s = in->ipn_data + sizeof(in->ipn_data);
                                i = read(nfd, s, n);
@@ -610,9 +606,6 @@
                                        return 1;
                                }
                        }
-               } else {
-                       ipn.ipn_dsize = 0;
-                       in = (nat_save_t *)malloc(sizeof(*in));
                }
                bcopy((char *)&ipn, (char *)in, sizeof(ipn));
 
@@ -751,7 +744,7 @@
                if (opts & OPT_VERBOSE)
                        printf("Got nat next %p ipn_dsize %d ng_sz %d\n",
                                ipnp->ipn_next, ipnp->ipn_dsize, ng.ng_sz);
-               if (write(nfd, ipnp, ng.ng_sz) != ng.ng_sz) {
+               if (write(nfd, ipnp, ipnp->ipn_dsize) != ipnp->ipn_dsize) {
                        perror("nat:write");
                        close(nfd);
                        free(ipnp);
diff -r 06e9a69ce18b -r 00cfb0460a1f sys/dist/ipf/netinet/ip_proxy.c
--- a/sys/dist/ipf/netinet/ip_proxy.c   Mon Apr 04 18:25:38 2005 +0000
+++ b/sys/dist/ipf/netinet/ip_proxy.c   Mon Apr 04 18:25:44 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ip_proxy.c,v 1.5 2005/02/19 21:30:25 martti Exp $      */
+/*     $NetBSD: ip_proxy.c,v 1.5.2.1 2005/04/04 18:25:44 tron Exp $    */
 
 /*
  * Copyright (C) 1997-2003 by Darren Reed.
@@ -105,7 +105,7 @@
 /* END OF INCLUDES */
 
 #if !defined(lint)
-static const char rcsid[] = "@(#)Id: ip_proxy.c,v 2.62.2.10 2005/02/17 04:40:03 darrenr Exp";
+static const char rcsid[] = "@(#)Id: ip_proxy.c,v 2.62.2.12 2005/03/03 14:28:24 darrenr Exp";
 #endif
 
 static int appr_fixseqack __P((fr_info_t *, ip_t *, ap_session_t *, int ));
@@ -153,7 +153,7 @@
 #ifdef IPF_PPTP_PROXY
        { NULL, "pptp", (char)IPPROTO_TCP, 0, 0,
          ippr_pptp_init, ippr_pptp_fini, ippr_pptp_new, ippr_pptp_del,
-         ippr_pptp_inout, ippr_pptp_inout, ippr_pptp_match, NULL },
+         ippr_pptp_inout, ippr_pptp_inout, NULL, NULL },
 #endif
 #ifdef  IPF_H323_PROXY
        { NULL, "h323", (char)IPPROTO_TCP, 0, 0, ippr_h323_init, ippr_h323_fini,



Home | Main Index | Thread Index | Old Index