[-]
[+]
|
Changed |
pmacct.spec
|
|
[-]
[+]
|
Added |
pmacct-0.12.3-bgp.patch
^
|
@@ -0,0 +1,19 @@
+--- src/bgp/bgp.c.orig 2010-07-31 13:22:02.117866605 +0200
++++ src/bgp/bgp.c 2010-07-31 13:23:52.751094500 +0200
+@@ -57,6 +57,7 @@
+ struct bgp_open *bopen;
+ char bgp_packet[BGP_MAX_PACKET_SIZE], *bgp_packet_ptr;
+ char bgp_reply_pkt[BGP_MAX_PACKET_SIZE], *bgp_reply_pkt_ptr;
++ char *str_buf;
+ #if defined ENABLE_IPV6
+ struct sockaddr_storage server, client;
+ struct ipv6_mreq multi_req6;
+@@ -309,7 +310,7 @@
+ }
+ else {
+ if (peer->buf.len > BGP_MAX_PACKET_SIZE) {
+- realloc(peer->buf.base, BGP_MAX_PACKET_SIZE);
++ str_buf = realloc(peer->buf.base, BGP_MAX_PACKET_SIZE);
+ memset(peer->buf.base, 0, BGP_MAX_PACKET_SIZE);
+ peer->buf.len = BGP_MAX_PACKET_SIZE;
+ }
|
[-]
[+]
|
Added |
pmacct-0.12.3_nfacct_ip-protocol-version.patch
^
|
@@ -0,0 +1,17 @@
+--- pmacct-0.12.3/src/nfacctd.c 2010-06-07 03:21:02.000000000 +0200
++++ cvs/pmacct/src/nfacctd.c 2010-07-29 23:16:08.000000000 +0200
+@@ -1594,8 +1594,12 @@
+
+ if (tpl->tpl[NF9_IN_VLAN].len && *(pptrs->f_data+tpl->tpl[NF9_IN_VLAN].off) > 0) ret += NF9_FTYPE_VLAN;
+ if (tpl->tpl[NF9_MPLS_LABEL_1].len /* check: value > 0 ? */) ret += NF9_FTYPE_MPLS;
+- if (*(pptrs->f_data+tpl->tpl[NF9_IP_PROTOCOL_VERSION].off) == 4 || tpl->tpl[NF9_IPV4_SRC_ADDR].len > 0);
+- else if (*(pptrs->f_data+tpl->tpl[NF9_IP_PROTOCOL_VERSION].off) == 6 || tpl->tpl[NF9_IPV6_SRC_ADDR].len > 0) ret += NF9_FTYPE_IPV6;
++
++ /* Explicit IP protocol definition first; a bit of heuristics as fallback */
++ if (*(pptrs->f_data+tpl->tpl[NF9_IP_PROTOCOL_VERSION].off) == 4);
++ else if (*(pptrs->f_data+tpl->tpl[NF9_IP_PROTOCOL_VERSION].off) == 6) ret += NF9_FTYPE_IPV6;
++ else if (tpl->tpl[NF9_IPV4_SRC_ADDR].len > 0);
++ else if (tpl->tpl[NF9_IPV6_SRC_ADDR].len > 0) ret += NF9_FTYPE_IPV6;
+
+ return ret;
+ }
|