Fixed ifc initialisation bug.
This commit is contained in:
@@ -25,7 +25,7 @@ char optstr[] = "+i:f:n:dhpb";
|
|||||||
static char *get_first_interface(void) {
|
static char *get_first_interface(void) {
|
||||||
int s, size = 1;
|
int s, size = 1;
|
||||||
struct ifreq *ifr;
|
struct ifreq *ifr;
|
||||||
struct ifconf ifc;
|
struct ifconf ifc = {0};
|
||||||
char *i = NULL;
|
char *i = NULL;
|
||||||
/* Use if_nameindex(3) instead? */
|
/* Use if_nameindex(3) instead? */
|
||||||
if ((s = socket(AF_INET, SOCK_DGRAM, 0)) == -1)
|
if ((s = socket(AF_INET, SOCK_DGRAM, 0)) == -1)
|
||||||
|
|||||||
Reference in New Issue
Block a user