summaryrefslogtreecommitdiff
path: root/ospfd
diff options
context:
space:
mode:
Diffstat (limited to 'ospfd')
-rw-r--r--ospfd/ChangeLog8
-rw-r--r--ospfd/ospf_packet.c6
2 files changed, 10 insertions, 4 deletions
diff --git a/ospfd/ChangeLog b/ospfd/ChangeLog
index 8423cab0..3724e360 100644
--- a/ospfd/ChangeLog
+++ b/ospfd/ChangeLog
@@ -1,3 +1,11 @@
+2004-09-27 Paul Jakma <paul@dishone.st>
+
+ * ospf_packet.c: (ospf_write) (struct msghdr).msg_name is caddr_t
+ on most platforms.
+ (ospf_recv_packet) ditto. And msg_flags is not always there
+ memset struct then set fields we care about rather than
+ initialise all fields individually.
+
2004-09-26 Hasso Tepper <hasso at quagga.net>
* ospf_abr.c, ospf_dump.c, ospf_lsa.c, ospf_packet.c, ospf_vty.c,
diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c
index 67926fc3..c362b9fd 100644
--- a/ospfd/ospf_packet.c
+++ b/ospfd/ospf_packet.c
@@ -665,7 +665,7 @@ ospf_write (struct thread *thread)
iph.ip_dst.s_addr = op->dst.s_addr;
memset (&msg, 0, sizeof (msg));
- msg.msg_name = &sa_dst;
+ msg.msg_name = (caddr_t) &sa_dst;
msg.msg_namelen = sizeof (sa_dst);
msg.msg_iov = iov;
msg.msg_iovlen = 2;
@@ -2018,13 +2018,11 @@ ospf_recv_packet (int fd, struct interface **ifp)
#endif
struct msghdr msgh;
- msgh.msg_name = NULL;
- msgh.msg_namelen = 0;
+ memset (&msgh, 0, sizeof (struct msghdr));
msgh.msg_iov = &iov;
msgh.msg_iovlen = 1;
msgh.msg_control = (caddr_t) buff;
msgh.msg_controllen = sizeof (buff);
- msgh.msg_flags = 0;
ret = recvfrom (fd, (void *)&iph, sizeof (iph), MSG_PEEK, NULL, 0);