patch-src_starter_interfaces_c 767 B

1234567891011121314151617181920
  1. --- strongswan-4.4.0.orig/src/starter/interfaces.c 2010-03-15 21:52:51.000000000 +0100
  2. +++ strongswan-4.4.0/src/starter/interfaces.c 2010-07-14 17:36:33.959074540 +0200
  3. @@ -56,7 +56,7 @@ get_defaultroute(defaultroute_t *default
  4. ssize_t msglen;
  5. int fd;
  6. - bzero(&rtu, sizeof(rtu));
  7. + memset(&rtu, 0, sizeof(rtu));
  8. rtu.m.nh.nlmsg_len = NLMSG_LENGTH(sizeof(rtu.m.rt));
  9. rtu.m.nh.nlmsg_flags = NLM_F_REQUEST | NLM_F_DUMP;
  10. rtu.m.nh.nlmsg_type = RTM_GETROUTE;
  11. @@ -142,7 +142,7 @@ get_defaultroute(defaultroute_t *default
  12. plog("could not open AF_INET socket");
  13. break;
  14. }
  15. - bzero(&req, sizeof(req));
  16. + memset(&req, 0, sizeof(req));
  17. req.ifr_ifindex = iface_idx;
  18. if (ioctl(fd, SIOCGIFNAME, &req) < 0 ||
  19. ioctl(fd, SIOCGIFADDR, &req) < 0)