diff options
Diffstat (limited to 'ospfd/ospf_packet.c')
-rw-r--r-- | ospfd/ospf_packet.c | 5 |
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); |