mirror of
https://github.com/yarrick/iodine.git
synced 2024-11-27 12:05:15 +00:00
Define searchpath for route with macro
Allows it to be easily overridden using the compiler commmandline. Just like IFCONFIGPATH.
This commit is contained in:
parent
67643ee996
commit
d2f671bdc7
@ -39,6 +39,10 @@
|
|||||||
#define IFCONFIGPATH "PATH=/sbin:/bin "
|
#define IFCONFIGPATH "PATH=/sbin:/bin "
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef ROUTEPATH
|
||||||
|
#define ROUTEPATH "PATH=/sbin:/bin "
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef WINDOWS32
|
#ifdef WINDOWS32
|
||||||
#include "windows.h"
|
#include "windows.h"
|
||||||
#include <winioctl.h>
|
#include <winioctl.h>
|
||||||
@ -629,7 +633,7 @@ tun_setip(const char *ip, const char *other_ip, int netbits)
|
|||||||
} else {
|
} else {
|
||||||
|
|
||||||
snprintf(cmdline, sizeof(cmdline),
|
snprintf(cmdline, sizeof(cmdline),
|
||||||
"/sbin/route add %s/%d %s",
|
ROUTEPATH "route add %s/%d %s",
|
||||||
inet_ntoa(netip), netbits, ip);
|
inet_ntoa(netip), netbits, ip);
|
||||||
}
|
}
|
||||||
fprintf(stderr, "Adding route %s/%d to %s\n", inet_ntoa(netip), netbits, ip);
|
fprintf(stderr, "Adding route %s/%d to %s\n", inet_ntoa(netip), netbits, ip);
|
||||||
|
Loading…
Reference in New Issue
Block a user