summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ospfd/ChangeLog4
-rw-r--r--ospfd/ospf_packet.c5
2 files changed, 8 insertions, 1 deletions
diff --git a/ospfd/ChangeLog b/ospfd/ChangeLog
index f3becf4a..40032a44 100644
--- a/ospfd/ChangeLog
+++ b/ospfd/ChangeLog
@@ -1,3 +1,7 @@
+2005-02-14 Paul Jakma <paul.jakma@sun.com>
+
+ * ospf_packet.c: (ospf_recv_packet) use stream_recvmsg.
+
2005-02-11 Hasso Tepper <hasso at quagga.net>
* ospf_lsdb.c: Fix sum of checksums calculation.
diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c
index c4dc56f0..c4e7f523 100644
--- a/ospfd/ospf_packet.c
+++ b/ospfd/ospf_packet.c
@@ -2096,7 +2096,10 @@ ospf_recv_packet (int fd, struct interface **ifp)
ibuf = stream_new (ip_len);
iov.iov_base = STREAM_DATA (ibuf);
iov.iov_len = ip_len;
- ret = recvmsg (fd, &msgh, 0);
+ if ( (ibuf = stream_new (ip_len)) == NULL)
+ return NULL;
+
+ ret = stream_recvmsg (ibuf, fd, &msgh, 0, ip_len);
ifindex = getsockopt_ifindex (AF_INET, &msgh);