Source-Changes-HG archive

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

[src/netbsd-3]: src/dist/ipf/lib Pull up revision 1.1.1.2 (requested by martt...



details:   https://anonhg.NetBSD.org/src/rev/790ccdc9a8c1
branches:  netbsd-3
changeset: 575114:790ccdc9a8c1
user:      tron <tron%NetBSD.org@localhost>
date:      Mon Apr 04 19:34:03 2005 +0000

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

diffstat:

 dist/ipf/lib/printpacket.c |  20 ++++++++++++--------
 1 files changed, 12 insertions(+), 8 deletions(-)

diffs (55 lines):

diff -r 79ac26316c66 -r 790ccdc9a8c1 dist/ipf/lib/printpacket.c
--- a/dist/ipf/lib/printpacket.c        Mon Apr 04 18:27:25 2005 +0000
+++ b/dist/ipf/lib/printpacket.c        Mon Apr 04 19:34:03 2005 +0000
@@ -1,11 +1,11 @@
-/*     $NetBSD: printpacket.c,v 1.1.1.1 2004/03/28 08:56:20 martti Exp $       */
+/*     $NetBSD: printpacket.c,v 1.1.1.1.6.1 2005/04/04 19:34:03 tron Exp $     */
 
 /*
  * Copyright (C) 1993-2001 by Darren Reed.
  *
  * See the IPFILTER.LICENCE file for details on licencing.
  *
- * Id: printpacket.c,v 1.12 2002/11/02 13:27:29 darrenr Exp
+ * Id: printpacket.c,v 1.12.4.1 2005/02/21 05:09:24 darrenr Exp
  */
 
 #include "ipf.h"
@@ -20,11 +20,15 @@
 {
        struct  tcphdr  *tcp;
        u_short len;
+       u_short off;
 
-       if (IP_V(ip) == 6)
+       if (IP_V(ip) == 6) {
+               off = 0;
                len = ntohs(((u_short *)ip)[2]) + 40;
-       else
+       } else {
+               off = ntohs(ip->ip_off);
                len = ntohs(ip->ip_len);
+       }
 
        if ((opts & OPT_HEX) == OPT_HEX) {
                u_char *s;
@@ -49,15 +53,15 @@
 
        tcp = (struct tcphdr *)((char *)ip + (IP_HL(ip) << 2));
        printf("ip %d(%d) %d", ntohs(ip->ip_len), IP_HL(ip) << 2, ip->ip_p);
-       if (ip->ip_off & IP_OFFMASK)
-               printf(" @%d", ip->ip_off << 3);
+       if (off & IP_OFFMASK)
+               printf(" @%d", off << 3);
        printf(" %s", inet_ntoa(ip->ip_src));
-       if (!(ip->ip_off & IP_OFFMASK))
+       if (!(off & IP_OFFMASK))
                if (ip->ip_p == IPPROTO_TCP || ip->ip_p == IPPROTO_UDP)
                        printf(",%d", ntohs(tcp->th_sport));
        printf(" > ");
        printf("%s", inet_ntoa(ip->ip_dst));
-       if (!(ip->ip_off & IP_OFFMASK)) {
+       if (!(off & IP_OFFMASK)) {
                if (ip->ip_p == IPPROTO_TCP || ip->ip_p == IPPROTO_UDP)
                        printf(",%d", ntohs(tcp->th_dport));
                if ((ip->ip_p == IPPROTO_TCP) && (tcp->th_flags != 0)) {



Home | Main Index | Thread Index | Old Index