Date: Tue, 6 Feb 2007 19:47:43 GMT From: Paolo Pisati <piso@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 114121 for review Message-ID: <200702061947.l16Jlhms049596@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200702061947.l16Jlhms049596>