]> git.proxmox.com Git - mirror_frr.git/commitdiff
2004-09-27 Paul Jakma <paul@dishone.st>
authorpaul <paul>
Mon, 27 Sep 2004 07:27:13 +0000 (07:27 +0000)
committerpaul <paul>
Mon, 27 Sep 2004 07:27:13 +0000 (07:27 +0000)
* 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.

ospfd/ChangeLog
ospfd/ospf_packet.c

index 8423cab051ddcd84fdaa04f2eed7c611ccb6a146..3724e360bfb0e34e3d2c1ce55bc00a74b4075251 100644 (file)
@@ -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,
index 67926fc34bc7216fe2dfb0db8e0f2f729e41b711..c362b9fdf98548a6a829577cde83281ec1c85c92 100644 (file)
@@ -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);