Fixed ARP table parser bug that meant only first entry got picked up.

This commit is contained in:
gardners 2011-12-04 17:02:09 +10:30
parent 3f2abe76c3
commit 6e12f6d514

View File

@ -106,7 +106,7 @@ int readArpTable(struct in_addr peers[],int *peer_count,int peer_max){
while(1){
int r;
r = fscanf(fp, "%d.%d.%d.%d",
r = fscanf(fp, "%d.%d.%d.%d[%*[^\n]\n",
&q1,&q2,&q3,&q4);
if (debug>1) fprintf(stderr,"Reading next arp entry (r=%d, %d.%d.%d.%d)\n",r,q1,q2,q3,q4);