Hello community,
here is the log from the commit of package libnl
checked in at Fri Aug 24 23:00:54 CEST 2007.
--------
--- libnl/libnl.changes 2007-08-22 15:26:48.000000000 +0200
+++ /mounts/work_src_done/STABLE/libnl/libnl.changes 2007-08-24 17:28:07.000000000 +0200
@@ -1,0 +2,10 @@
+Fri Aug 24 17:26:02 CEST 2007 - olh@suse.de
+
+- include linux/types.h
+ do not redefine typedefs
+ use stddef.h offsetof
+ fix out of bounds access in route metric functions
+ fix incorrect char usage in nl_str2af
+ remove compiler warnings by checking vasprintf return value
+
+-------------------------------------------------------------------
New:
----
libnl.__dp_dump.vasprintf.patch
libnl.nl_str2af.patch
libnl.print_class.cast.patch
libnl.raw_dump_msg.formatstring.patch
libnl.route.metric-overflow.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libnl.spec ++++++
--- /var/tmp/diff_new_pack.r18528/_old 2007-08-24 22:58:35.000000000 +0200
+++ /var/tmp/diff_new_pack.r18528/_new 2007-08-24 22:58:35.000000000 +0200
@@ -17,7 +17,7 @@
Group: Development/Libraries/Other
License: LGPL v2 or later
Version: 1.0
-Release: 72
+Release: 74
URL: http://people.suug.ch/~tgr/libnl/
Source: http://people.suug.ch/~tgr/libnl/files/libnl-%{version}-%{preversion}.tar.gz
Source1: %{name}-1.pc
@@ -27,6 +27,11 @@
Patch3: r22.diff
Patch4: r23.diff
Patch5: r28.diff
+Patch6: libnl.nl_str2af.patch
+Patch7: libnl.__dp_dump.vasprintf.patch
+Patch8: libnl.route.metric-overflow.patch
+Patch9: libnl.raw_dump_msg.formatstring.patch
+Patch10: libnl.print_class.cast.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
@@ -57,12 +62,15 @@
%prep
%setup -q -n libnl-%{version}-%{preversion}
%patch
-%ifnarch ia64 ppc64 s390x
%patch1 -p1
-%endif
%patch3
-%patch4
+%patch4 -p1
%patch5
+%patch6 -p1
+%patch7 -p1
+%patch8 -p1
+%patch9 -p1
+%patch10 -p1
%build
#%configure
@@ -101,6 +109,13 @@
%{_libdir}/pkgconfig/%{name}-1.pc
%changelog
+* Fri Aug 24 2007 - olh@suse.de
+- include linux/types.h
+ do not redefine typedefs
+ use stddef.h offsetof
+ fix out of bounds access in route metric functions
+ fix incorrect char usage in nl_str2af
+ remove compiler warnings by checking vasprintf return value
* Wed Aug 22 2007 - dmueller@suse.de
- fix accesses of free'd memory which crash NetworkManager-kde
* Mon Feb 20 2006 - ro@suse.de
++++++ libnl.__dp_dump.vasprintf.patch ++++++
../include/netlink-local.h:229: warning: ignoring return value of 'vasprintf', declared with attribute warn_unused_result
---
include/netlink-local.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/include/netlink-local.h
+++ b/include/netlink-local.h
@@ -226,10 +226,11 @@ static inline void __dp_dump(struct nl_d
vfprintf(parms->dp_fd, fmt, args);
else if (parms->dp_buf) {
char *buf = NULL;
- vasprintf(&buf, fmt, args);
+ if (vasprintf(&buf, fmt, args) >= 0) {
strncat(parms->dp_buf, buf,
parms->dp_buflen - strlen(parms->dp_buf) - 1);
free(buf);
+ }
}
}
++++++ libnl.nl_str2af.patch ++++++
addr.c:897: warning: comparison is always true due to limited range of data type
---
include/netlink/addr.h | 2 +-
lib/addr.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
--- a/include/netlink/addr.h
+++ b/include/netlink/addr.h
@@ -48,7 +48,7 @@ extern unsigned int nl_addr_get_prefixle
/* Address Family Translations */
extern char * nl_af2str(char, char *, size_t);
-extern char nl_str2af(const char *);
+extern int nl_str2af(const char *);
/* Translations to Strings */
extern char * nl_addr2str(struct nl_addr *, char *, size_t);
--- a/lib/addr.c
+++ b/lib/addr.c
@@ -891,9 +891,9 @@ char *nl_af2str(char family, char *buf,
*
* @return Address family as number or \c AF_UNSPEC.
*/
-char nl_str2af(const char *name)
+int nl_str2af(const char *name)
{
- char fam = __str2type(name, afs, ARRAY_SIZE(afs));
+ int fam = __str2type(name, afs, ARRAY_SIZE(afs));
return fam >= 0 ? fam : AF_UNSPEC;
}
++++++ libnl.print_class.cast.patch ++++++
---
src/nl-tctree-dump.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- a/src/nl-tctree-dump.c
+++ b/src/nl-tctree-dump.c
@@ -28,7 +28,7 @@ static void print_class(struct nl_object
struct nl_cache *cls_cache;
uint32_t parent = rtnl_class_get_handle(class);
- dump_params.dp_prefix = (int) arg;
+ dump_params.dp_prefix = (int)(unsigned long)arg;
nl_object_dump(obj, &dump_params);
leaf = rtnl_class_leaf_qdisc(class, qdisc_cache);
@@ -41,7 +41,7 @@ static void print_class(struct nl_object
if (!cls_cache)
return;
- dump_params.dp_prefix = (int) arg + 2;
+ dump_params.dp_prefix = (int)(unsigned long) arg + 2;
nl_cache_dump(cls_cache, &dump_params);
nl_cache_destroy_and_free(cls_cache);
}
@@ -52,7 +52,7 @@ static void print_qdisc(struct nl_object
struct nl_cache *cls_cache;
uint32_t parent = rtnl_qdisc_get_handle(qdisc);
- dump_params.dp_prefix = (int) arg;
+ dump_params.dp_prefix = (int)(unsigned long) arg;
nl_object_dump(obj, &dump_params);
rtnl_qdisc_foreach_child(qdisc, class_cache, &print_class, arg + 2);
@@ -61,7 +61,7 @@ static void print_qdisc(struct nl_object
if (!cls_cache)
return;
- dump_params.dp_prefix = (int) arg + 2;
+ dump_params.dp_prefix = (int)(unsigned long) arg + 2;
nl_cache_dump(cls_cache, &dump_params);
nl_cache_destroy_and_free(cls_cache);
}
++++++ libnl.raw_dump_msg.formatstring.patch ++++++
---
lib/handlers.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- a/lib/handlers.c
+++ b/lib/handlers.c
@@ -90,17 +90,17 @@ static void raw_dump_msg(FILE *ofd, stru
"-------------------------- BEGIN NETLINK MESSAGE "
"---------------------------\n");
- fprintf(ofd, " [HEADER] %d octets\n", sizeof(*hdr));
+ fprintf(ofd, " [HEADER] %d octets\n", (int)sizeof(*hdr));
print_hdr(ofd, hdr);
if (hdr->nlmsg_type == NLMSG_ERROR &&
hdr->nlmsg_len >= nlmsg_msg_size(sizeof(struct nlmsgerr))) {
struct nlmsgerr *err = nlmsg_data(hdr);
- fprintf(ofd, " [ERRORMSG] %d octets\n", sizeof(*err));
+ fprintf(ofd, " [ERRORMSG] %d octets\n", (int)sizeof(*err));
fprintf(ofd, " .error = %d \"%s\"\n", err->error,
strerror(-err->error));
- fprintf(ofd, " [ORIGINAL MESSAGE] %d octets\n", sizeof(*hdr));
+ fprintf(ofd, " [ORIGINAL MESSAGE] %d octets\n", (int)sizeof(*hdr));
print_hdr(ofd, &err->msg);
} else if (nlmsg_len(hdr) > 0) {
struct nl_cache_ops *ops;
++++++ libnl.route.metric-overflow.patch ++++++
route/route.c:910: warning: array subscript is above array bounds
route/route.c:947: warning: array subscript is above array bounds
---
lib/route/route.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- a/lib/route/route.c
+++ b/lib/route/route.c
@@ -903,7 +903,7 @@ unsigned int rtnl_route_get_flags(struct
*/
int rtnl_route_set_metric(struct rtnl_route *route, int metric, uint32_t value)
{
- if (metric <= RTAX_MAX || metric < 1)
+ if (metric >= RTAX_MAX || metric < 1)
return nl_error(EINVAL, "Metric out of range (1..%d)",
RTAX_MAX);
@@ -921,7 +921,7 @@ int rtnl_route_set_metric(struct rtnl_ro
*/
int rtnl_route_unset_metric(struct rtnl_route *route, int metric)
{
- if (metric <= RTAX_MAX || metric < 1)
+ if (metric >= RTAX_MAX || metric < 1)
return nl_error(EINVAL, "Metric out of range (1..%d)",
RTAX_MAX);
@@ -938,7 +938,7 @@ int rtnl_route_unset_metric(struct rtnl_
*/
unsigned int rtnl_route_get_metric(struct rtnl_route *route, int metric)
{
- if (metric <= RTAX_MAX || metric < 1)
+ if (metric >= RTAX_MAX || metric < 1)
return UINT_MAX;
if (!(route->rt_metrics_mask & (metric - 1)))
++++++ libnl-typedef.patch ++++++
--- /var/tmp/diff_new_pack.r18528/_old 2007-08-24 22:58:35.000000000 +0200
+++ /var/tmp/diff_new_pack.r18528/_new 2007-08-24 22:58:35.000000000 +0200
@@ -1,13 +1,20 @@
-diff -pur libnl-1.0-pre5-4/include/netlink-local.h libnl-1.0-pre5/include/netlink-local.h
---- libnl-1.0-pre5-4/include/netlink-local.h 2005-11-15 05:01:17.876722753 -0800
-+++ libnl-1.0-pre5/include/netlink-local.h 2005-11-15 05:08:49.763035970 -0800
-@@ -34,7 +34,8 @@ typedef uint8_t __u8;
- typedef uint16_t __u16;
- typedef uint32_t __u32;
- typedef int32_t __s32;
--typedef uint64_t __u64;
-+//typedef uint64_t __u64;
-+typedef unsigned long long __u64;
+---
+ include/netlink-local.h | 7 +------
+ 1 file changed, 1 insertion(+), 6 deletions(-)
+
+--- a/include/netlink-local.h
++++ b/include/netlink-local.h
+@@ -30,12 +30,7 @@
+ #include