|
|
@ -279,7 +279,7 @@ int ast_ouraddrfor(struct in_addr *them, struct in_addr *us)
|
|
|
|
fgets(line,sizeof(line),PROC);
|
|
|
|
fgets(line,sizeof(line),PROC);
|
|
|
|
|
|
|
|
|
|
|
|
while (!feof(PROC)) {
|
|
|
|
while (!feof(PROC)) {
|
|
|
|
char iface[8];
|
|
|
|
char iface[256];
|
|
|
|
unsigned int dest, gateway, mask;
|
|
|
|
unsigned int dest, gateway, mask;
|
|
|
|
int i,fieldnum;
|
|
|
|
int i,fieldnum;
|
|
|
|
char *fields[40];
|
|
|
|
char *fields[40];
|
|
|
@ -303,6 +303,7 @@ int ast_ouraddrfor(struct in_addr *them, struct in_addr *us)
|
|
|
|
i = offset - line;
|
|
|
|
i = offset - line;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (fieldnum >= 8) {
|
|
|
|
|
|
|
|
|
|
|
|
sscanf(fields[0],"%s",iface);
|
|
|
|
sscanf(fields[0],"%s",iface);
|
|
|
|
sscanf(fields[1],"%x",&dest);
|
|
|
|
sscanf(fields[1],"%x",&dest);
|
|
|
@ -317,6 +318,7 @@ int ast_ouraddrfor(struct in_addr *them, struct in_addr *us)
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
fclose(PROC);
|
|
|
|
fclose(PROC);
|
|
|
|
if (res == 1) {
|
|
|
|
if (res == 1) {
|
|
|
|
ast_log(LOG_WARNING, "Yikes! No default route?!!\n");
|
|
|
|
ast_log(LOG_WARNING, "Yikes! No default route?!!\n");
|
|
|
|