summaryrefslogtreecommitdiff
path: root/ospfd/ospf_packet.c
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 /ospfd/ospf_packet.c
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.
Diffstat (limited to 'ospfd/ospf_packet.c')
-rw-r--r--ospfd/ospf_packet.c5
1 files changed, 2 insertions, 3 deletions
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);