summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2004-01-23 23:20:25 +0000
committerLennart Poettering <lennart@poettering.net>2004-01-23 23:20:25 +0000
commit95c6823f9d0eb7110d8327bccfa52f57cc391bc4 (patch)
treeedbefa79d13e8954db50e52bc819b7e8f61f1fb2 /src
parentb651436a9783a7b2c929ab6b7f4c08cc2454f623 (diff)
compatibility with 2.6
documentation update git-svn-id: file:///home/lennart/svn/public/ifmetric/trunk@16 b1ab5a0b-19c4-0310-9d9a-ef184d715f50
Diffstat (limited to 'src')
-rw-r--r--src/nlrequest.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/nlrequest.c b/src/nlrequest.c
index 1f72357..99fd3d0 100644
--- a/src/nlrequest.c
+++ b/src/nlrequest.c
@@ -44,7 +44,7 @@ int netlink_request(int s, struct nlmsghdr *n, int (*callback) (struct nlmsghdr
for (;;) {
int bytes;
- char replybuf[1024];
+ char replybuf[2048];
struct nlmsghdr *p = (struct nlmsghdr *) replybuf;
if ((bytes = recv(s, &replybuf, sizeof(replybuf), 0)) < 0) {
@@ -55,8 +55,8 @@ int netlink_request(int s, struct nlmsghdr *n, int (*callback) (struct nlmsghdr
for (; bytes > 0; p = NLMSG_NEXT(p, bytes)) {
int ret;
- if (!NLMSG_OK(p, bytes) || bytes < sizeof(struct nlmsghdr) || bytes < p->nlmsg_len) {
- fprintf(stderr, "NETLINK: Packet too small or truncated!\n");
+ if (!NLMSG_OK(p, bytes) || bytes < sizeof(struct nlmsghdr) || bytes < p->nlmsg_len) {
+ fprintf(stderr, "NETLINK: Packet too small or truncated! %u!=%u!=%u\n", bytes, sizeof(struct nlmsghdr), p->nlmsg_len);
return -1;
}
@@ -114,11 +114,10 @@ int addattr_l(struct nlmsghdr *n, int maxlen, int type, void *data, int alen) {
}
/*
- * Utility function comes from iproute2.
+ * Utility function originated from iproute2.
* Author: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
*/
-
int addattr32(struct nlmsghdr *n, int maxlen, int type, int data) {
int len;
struct rtattr *rta;