summaryrefslogtreecommitdiff
path: root/ospfd
diff options
context:
space:
mode:
Diffstat (limited to 'ospfd')
-rw-r--r--ospfd/ChangeLog5
-rw-r--r--ospfd/ospf_packet.c5
2 files changed, 7 insertions, 3 deletions
diff --git a/ospfd/ChangeLog b/ospfd/ChangeLog
index 40032a44..c6607e0c 100644
--- a/ospfd/ChangeLog
+++ b/ospfd/ChangeLog
@@ -1,3 +1,8 @@
+2005-02-15 Paul Jakma <paul.jakma@sun.com>
+
+ * ospf_packet.c: (ospf_recv_packet) Fix silly error wrt allocating
+ ibuf. Thanks Andrew.
+
2005-02-14 Paul Jakma <paul.jakma@sun.com>
* ospf_packet.c: (ospf_recv_packet) use stream_recvmsg.
diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c
index c4e7f523..58369250 100644
--- a/ospfd/ospf_packet.c
+++ b/ospfd/ospf_packet.c
@@ -2093,11 +2093,10 @@ ospf_recv_packet (int fd, struct interface **ifp)
ip_len = ip_len + (iph.ip_hl << 2);
#endif
- ibuf = stream_new (ip_len);
- iov.iov_base = STREAM_DATA (ibuf);
- iov.iov_len = ip_len;
if ( (ibuf = stream_new (ip_len)) == NULL)
return NULL;
+ iov.iov_base = STREAM_DATA (ibuf);
+ iov.iov_len = ip_len;
ret = stream_recvmsg (ibuf, fd, &msgh, 0, ip_len);