summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlastair Houghton <alastair@coriolis-systems.com>2014-05-16 20:28:20 +0100
committerAlastair Houghton <alastair@coriolis-systems.com>2014-05-16 20:28:20 +0100
commit043942e375fdb8ac88e77ced2dd7e2655c33ef92 (patch)
treed507480daa3ccdf10a6e03d7e27b6621585b8763
parent594b7884adcb0e11640d58a9d1b58e77f485b788 (diff)
downloadnetifaces-043942e375fdb8ac88e77ced2dd7e2655c33ef92.tar.gz
Fixed a similar problem, but that might happen in the case of multi-part messages.
-rw-r--r--netifaces.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/netifaces.c b/netifaces.c
index 6e09323..cf14482 100644
--- a/netifaces.c
+++ b/netifaces.c
@@ -1544,7 +1544,7 @@ gateways (PyObject *self)
do {
struct sockaddr_nl sanl_from;
- struct iovec iov = { pmsg, bufsize };
+ struct iovec iov = { msgbuf, bufsize };
struct msghdr msghdr = {
&sanl_from,
sizeof(sanl_from),
@@ -1575,6 +1575,7 @@ gateways (PyObject *self)
}
nllen = ret;
+ pmsg = msgbuf;
while (NLMSG_OK (&pmsg->hdr, nllen)) {
void *dst = NULL;
void *gw = NULL;