1 |
jer 10/12/29 16:57:29 |
2 |
|
3 |
Added: pmacct-0.12.5-sin6_addr.patch |
4 |
Log: |
5 |
Version bump. Set sizeof(sin6_addr) instead of hardcoded value (bug #340147). |
6 |
|
7 |
(Portage version: 2.2.0_alpha10/cvs/Linux i686) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 net-analyzer/pmacct/files/pmacct-0.12.5-sin6_addr.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/pmacct/files/pmacct-0.12.5-sin6_addr.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/pmacct/files/pmacct-0.12.5-sin6_addr.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: pmacct-0.12.5-sin6_addr.patch |
16 |
=================================================================== |
17 |
--- a/src/bgp/bgp.c 2010-12-21 17:56:52.000000000 +0100 |
18 |
+++ b/src/bgp/bgp.c 2010-12-29 17:44:43.000000000 +0100 |
19 |
@@ -1782,7 +1782,7 @@ |
20 |
sa = &sa_local; |
21 |
memset(sa, 0, sizeof(struct sockaddr)); |
22 |
sa->sa_family = AF_INET6; |
23 |
- memcpy(&((struct sockaddr_in6 *)sa)->sin6_addr, &info->attr->mp_nexthop.address.ipv6, 16); |
24 |
+ memcpy(&((struct sockaddr_in6 *)sa)->sin6_addr, &info->attr->mp_nexthop.address.ipv6, sizeof(&((struct sockaddr_in6 *)sa)->sin6_addr)); |
25 |
goto start_again; |
26 |
} |
27 |
#endif |
28 |
@@ -1911,7 +1911,7 @@ |
29 |
pptrs->f_agent = (char *) &sa_local; |
30 |
memset(sa, 0, sizeof(struct sockaddr)); |
31 |
sa->sa_family = AF_INET6; |
32 |
- memcpy(&((struct sockaddr_in6 *)sa)->sin6_addr, &info->attr->mp_nexthop.address.ipv6, 16); |
33 |
+ memcpy(&((struct sockaddr_in6 *)sa)->sin6_addr, &info->attr->mp_nexthop.address.ipv6, sizeof(&((struct sockaddr_in6 *)sa)->sin6_addr)); |
34 |
saved_info = (char *) info; |
35 |
ttl--; |
36 |
goto start_again; |