summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpaul <paul>2005-02-15 10:10:55 +0000
committerpaul <paul>2005-02-15 10:10:55 +0000
commit658b03a6bbb88357d841a99908d729e05e3b98c2 (patch)
tree1ac1754274dfa07965c57f266de564e6522799a4
parent1e19315262b1eb1228af31f43aee7c9c3e9eefc6 (diff)
2005-02-15 Paul Jakma <paul.jakma@sun.com>
* ospf_packet.c: (ospf_recv_packet) Fix silly error wrt allocating ibuf. Thanks Andrew.
-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);