[iptstate-commit] iptstate Changelog, 1.13, 1.14 iptstate.cc, 1.21, 1.22
Brought to you by:
jaymzh
|
From: Phil D. <ja...@us...> - 2011-04-04 04:55:17
|
Update of /cvsroot/iptstate/iptstate
In directory vz-cvs-4.sog:/tmp/cvs-serv30276
Modified Files:
Changelog iptstate.cc
Log Message:
- Fix formatting issue with ICMP states. Closes #2969917
Index: iptstate.cc
===================================================================
RCS file: /cvsroot/iptstate/iptstate/iptstate.cc,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- iptstate.cc 4 Apr 2011 03:07:52 -0000 1.21
+++ iptstate.cc 4 Apr 2011 04:55:15 -0000 1.22
@@ -996,6 +996,9 @@
sizeof(uint8_t[16]));
memcpy(entry.dst.s6_addr, nfct_get_attr(ct, ATTR_ORIG_IPV6_DST),
sizeof(uint8_t[16]));
+ } else {
+ fprintf(stderr, "UNKNOWN FAMILY!\n");
+ exit(1);
}
// Counters (summary, in + out)
@@ -1011,6 +1014,9 @@
max->packets = digits(entry.packets);
}
+ if (entry.proto.size() > max->proto)
+ max->proto = entry.proto.size();
+
// OK, proto dependent stuff
if (entry.proto == "tcp" || entry.proto == "udp") {
entry.srcpt = htons(
@@ -1020,39 +1026,23 @@
}
if (entry.proto == "tcp") {
-
entry.state =
states[nfct_get_attr_u8(ct, ATTR_TCP_STATE)];
counts->tcp++;
-
} else if (entry.proto == "udp") {
-
entry.state = "";
counts->udp++;
-
} else if (entry.proto == "icmp") {
-
typecode.str("");
typecode << (int)nfct_get_attr_u8(ct, ATTR_ICMP_TYPE)
<< "/" << (int)nfct_get_attr_u8(ct, ATTR_ICMP_CODE)
<< " (" << nfct_get_attr_u16(ct, ATTR_ICMP_ID)
<< ")";
-
entry.state = typecode.str();
counts->icmp++;
-
} else {
- /*
- * If the protocol is something else, then we need
- * to know how long the name of the protocol is so
- * we can format accordingly later.
- */
- if (entry.proto.size() > max->proto)
- max->proto = entry.proto.size();
-
counts->other++;
-
}
/*
Index: Changelog
===================================================================
RCS file: /cvsroot/iptstate/iptstate/Changelog,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- Changelog 19 Sep 2009 21:07:02 -0000 1.13
+++ Changelog 4 Apr 2011 04:55:14 -0000 1.14
@@ -1,3 +1,8 @@
+2.2.3
+- IPv6 support
+- Handle filters as in6_addr and uints instead of strings
+- Fix loopback filtering support
+
2.2.2
- Released 09/19/09
- Fix includes
|