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