PERFORCE change 114121 for review
Paolo Pisati
piso at FreeBSD.org
Tue Feb 6 19:47:47 UTC 2007
http://perforce.freebsd.org/chv.cgi?CH=114121
Change 114121 by piso at 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);
More information about the p4-projects
mailing list