Delete (possibly incomplete) ARP table entry before adding.
Thanks to Chritos Zoulas and others. Fixes PR# 1242
This commit is contained in:
parent
e69420e49a
commit
a9badc45e2
|
@ -127,11 +127,14 @@ setarp(s, ia, ha, len)
|
||||||
* Oh well, SIOCSARP is not defined. Just run arp(8).
|
* Oh well, SIOCSARP is not defined. Just run arp(8).
|
||||||
* XXX - Gag!
|
* XXX - Gag!
|
||||||
*/
|
*/
|
||||||
char buf[256];
|
|
||||||
int status;
|
int status;
|
||||||
|
char buf[256];
|
||||||
|
char *a;
|
||||||
|
extern char *inet_ntoa();
|
||||||
|
|
||||||
sprintf(buf, "arp -s %s %s temp",
|
a = inet_ntoa(*ia);
|
||||||
inet_ntoa(*ia), haddrtoa(ha, len));
|
sprintf(buf, "arp -d %s; arp -s %s %s temp",
|
||||||
|
a, a, haddrtoa(ha, len));
|
||||||
if (debug > 2)
|
if (debug > 2)
|
||||||
report(LOG_INFO, buf);
|
report(LOG_INFO, buf);
|
||||||
status = system(buf);
|
status = system(buf);
|
||||||
|
|
|
@ -127,11 +127,14 @@ setarp(s, ia, ha, len)
|
||||||
* Oh well, SIOCSARP is not defined. Just run arp(8).
|
* Oh well, SIOCSARP is not defined. Just run arp(8).
|
||||||
* XXX - Gag!
|
* XXX - Gag!
|
||||||
*/
|
*/
|
||||||
char buf[256];
|
|
||||||
int status;
|
int status;
|
||||||
|
char buf[256];
|
||||||
|
char *a;
|
||||||
|
extern char *inet_ntoa();
|
||||||
|
|
||||||
sprintf(buf, "arp -s %s %s temp",
|
a = inet_ntoa(*ia);
|
||||||
inet_ntoa(*ia), haddrtoa(ha, len));
|
sprintf(buf, "arp -d %s; arp -s %s %s temp",
|
||||||
|
a, a, haddrtoa(ha, len));
|
||||||
if (debug > 2)
|
if (debug > 2)
|
||||||
report(LOG_INFO, buf);
|
report(LOG_INFO, buf);
|
||||||
status = system(buf);
|
status = system(buf);
|
||||||
|
|
Loading…
Reference in New Issue