From owner-p4-projects@FreeBSD.ORG Tue Feb 6 19:47:46 2007 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id F112816A401; Tue, 6 Feb 2007 19:47:44 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7B32F16A407 for ; Tue, 6 Feb 2007 19:47:43 +0000 (UTC) (envelope-from piso@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id 6CFF213C4B8 for ; Tue, 6 Feb 2007 19:47:43 +0000 (UTC) (envelope-from piso@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id l16JlhuA049599 for ; Tue, 6 Feb 2007 19:47:43 GMT (envelope-from piso@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id l16Jlhms049596 for perforce@freebsd.org; Tue, 6 Feb 2007 19:47:43 GMT (envelope-from piso@freebsd.org) Date: Tue, 6 Feb 2007 19:47:43 GMT Message-Id: <200702061947.l16Jlhms049596@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to piso@freebsd.org using -f From: Paolo Pisati To: Perforce Change Reviews Cc: Subject: PERFORCE change 114121 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Feb 2007 19:47:47 -0000 http://perforce.freebsd.org/chv.cgi?CH=114121 Change 114121 by piso@piso_newluxor on 2007/02/06 19:47:40 Axe some more useless debug prints. Affected files ... .. //depot/projects/soc2005/libalias/sys/netinet/ip_fw2.c#44 edit .. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias.c#59 edit Differences ... ==== //depot/projects/soc2005/libalias/sys/netinet/ip_fw2.c#44 (text+ko) ==== @@ -3497,10 +3497,8 @@ t; } if ((m = m_pullup(m, sizeof(struct ip))) == - NULL) { - printf("1\n"); + NULL) goto badnat; - } ip = mtod(m, struct ip *); if (args->eh == NULL) { ip->ip_len = htons(ip->ip_len); @@ -3579,10 +3577,8 @@ goto done; } if ((m = m_pullup(m, sizeof(struct ip))) == - NULL) { - printf("2\n"); + NULL) goto badnat; - } ip = mtod(m, struct ip *); m->m_pkthdr.len = ntohs(ip->ip_len); @@ -3596,10 +3592,8 @@ struct tcphdr *th; if ((m = m_pullup(m, (ip->ip_hl << 2) + - sizeof(struct tcphdr))) == NULL) { - printf("3\n"); + sizeof(struct tcphdr))) == NULL) goto badnat; - } ip = mtod(m, struct ip *); th = (struct tcphdr *)(ip + 1); if (th->th_x2) @@ -3624,10 +3618,8 @@ if ((m = m_pullup(m, (ip->ip_hl << 2) + sizeof(struct tcphdr))) == - NULL) { - printf("4\n"); + NULL) goto badnat; - } ip = mtod(m, struct ip *); th = (struct tcphdr *)(ip + 1); /* @@ -3644,10 +3636,8 @@ if ((m = m_pullup(m, (ip->ip_hl << 2) + sizeof(struct udphdr))) == - NULL) { - printf("5\n"); + NULL) goto badnat; - } ip = mtod(m, struct ip *); uh = (struct udphdr *)(ip + 1); uh->uh_sum = cksum; ==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias.c#59 (text+ko) ==== @@ -1424,24 +1424,19 @@ la->packetAliasMode &= ~PKT_ALIAS_REVERSE; iresult = LibAliasInLocked(la, ptr, maxpacketsize); la->packetAliasMode |= PKT_ALIAS_REVERSE; - printf("PKT_ALIAS_REVERSE\n"); goto getout; } HouseKeeping(la); ClearCheckNewLink(la); PULLUP_IPHDR(pip, ptr); - if (pip == NULL) { - printf("failed PULLUP_IPHDR\n"); + if (pip == NULL) goto getout; - } /* Defense against mangled packets */ if (maxpacketsize != 0) { if (ntohs(pip->ip_len) > maxpacketsize - || (pip->ip_hl << 2) > maxpacketsize) { - printf("mangled pkt\n"); + || (pip->ip_hl << 2) > maxpacketsize) goto getout; - } } addr_save = GetDefaultAliasAddress(la);