patch-src_knockd_c 678 B

1234567891011121314151617181920
  1. $Id: update-patches 24 2008-08-31 14:56:13Z wbx $
  2. --- knock-0.5.orig/src/knockd.c 2005-06-27 07:11:34.000000000 +0200
  3. +++ knock-0.5/src/knockd.c 2009-06-01 21:43:53.000000000 +0200
  4. @@ -46,6 +46,7 @@
  5. #include <syslog.h>
  6. #include <pcap.h>
  7. #include <errno.h>
  8. +#include <linux/limits.h>
  9. #include "list.h"
  10. static char version[] = "0.5";
  11. @@ -1064,7 +1065,7 @@ char* get_ip(const char* iface, char *bu
  12. return(NULL);
  13. }
  14. - bzero((void*)(&ifr.ifr_name), sizeof(ifr.ifr_name));
  15. + memset((void*)(&ifr.ifr_name), 0, sizeof(ifr.ifr_name));
  16. strncpy(ifr.ifr_name, iface, sizeof(ifr.ifr_name)-1);
  17. ifr.ifr_name[sizeof(ifr.ifr_name)-1] = '\0';
  18. if(ioctl(s, SIOCGIFADDR, &ifr)) {