From: shemminger Date: Tue, 4 Oct 2005 23:15:32 +0000 (+0000) Subject: When assigning an ip address to an ethernet adapter, the newest X-Git-Tag: ss-051006~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fb2297599de1fb7447a050e16e0179f739460473;p=thirdparty%2Fiproute2.git When assigning an ip address to an ethernet adapter, the newest (050929) version of 'ip addr' hangs while older versions worked. The problem was traced to be a removed initialisation. The patch below corrects this problem. --- diff --git a/ChangeLog b/ChangeLog index dd1973db9..013b473cd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,8 @@ -2005-09-21 Stephen Hemminger +2005-10-04 Jerome Borsboom + + * Fix regression in ip addr (libnetlink) handling + +2005-09-21 Stephen Hemminger * Fix uninitialized memory and leaks with valgrind Reported by Redhat diff --git a/lib/libnetlink.c b/lib/libnetlink.c index 82f811bbb..24e1f0b6f 100644 --- a/lib/libnetlink.c +++ b/lib/libnetlink.c @@ -235,7 +235,10 @@ int rtnl_talk(struct rtnl_handle *rtnl, struct nlmsghdr *n, pid_t peer, unsigned seq; struct nlmsghdr *h; struct sockaddr_nl nladdr; - struct iovec iov; + struct iovec iov = { + .iov_base = (void*) n, + .iov_len = n->nlmsg_len + }; struct msghdr msg = { .msg_name = &nladdr, .msg_namelen = sizeof(nladdr),