X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fifconfig.c;h=76092a7b268c52fd83621a07d2c3852377698e93;hp=4b47ad13f0e112d3833cb97bf09976531f3bc04f;hb=5f76bc06fba1d4ab1cfa460fff5c2695e21cabae;hpb=1c475ecb575367a6b3f9328b0f643ad636155341 diff --git a/src/ifconfig.c b/src/ifconfig.c index 4b47ad13..76092a7b 100644 --- a/src/ifconfig.c +++ b/src/ifconfig.c @@ -134,11 +134,11 @@ void ifconfig_address(FILE *out, const char *value) { break; case SUBNET_IPV4: - fprintf(out, "netsh inetface ipv4 set address \"$INTERFACE\" static %s\n", address_str); + fprintf(out, "netsh inetface ipv4 set address \"%%INTERFACE%%\" static %s\n", address_str); break; case SUBNET_IPV6: - fprintf(out, "netsh inetface ipv6 set address \"$INTERFACE\" static %s\n", address_str); + fprintf(out, "netsh inetface ipv6 set address \"%%INTERFACE%%\" %s\n", address_str); break; default: @@ -199,11 +199,11 @@ void ifconfig_route(FILE *out, const char *value) { if(*gateway_str) { switch(subnet.type) { case SUBNET_IPV4: - fprintf(out, "ip route add %s via %s dev \"$INTERFACE\"\n", subnet_str, gateway_str); + fprintf(out, "ip route add %s via %s dev \"$INTERFACE\" onlink\n", subnet_str, gateway_str); break; case SUBNET_IPV6: - fprintf(out, "ip route add %s via %s dev \"$INTERFACE\"\n", subnet_str, gateway_str); + fprintf(out, "ip route add %s via %s dev \"$INTERFACE\" onlink\n", subnet_str, gateway_str); break; default: @@ -229,11 +229,11 @@ void ifconfig_route(FILE *out, const char *value) { if(*gateway_str) { switch(subnet.type) { case SUBNET_IPV4: - fprintf(out, "netsh inetface ipv4 add route %s \"%%INTERFACE%%\" %s\n", subnet_str, gateway_str); + fprintf(out, "netsh interface ipv4 add route %s \"%%INTERFACE%%\" %s\n", subnet_str, gateway_str); break; case SUBNET_IPV6: - fprintf(out, "netsh inetface ipv6 add route %s \"%%INTERFACE%%\" %s\n", subnet_str, gateway_str); + fprintf(out, "netsh interface ipv6 add route %s \"%%INTERFACE%%\" %s\n", subnet_str, gateway_str); break; default: @@ -242,11 +242,11 @@ void ifconfig_route(FILE *out, const char *value) { } else { switch(subnet.type) { case SUBNET_IPV4: - fprintf(out, "netsh inetface ipv4 add route %s \"%%INTERFACE%%\"\n", subnet_str); + fprintf(out, "netsh interface ipv4 add route %s \"%%INTERFACE%%\"\n", subnet_str); break; case SUBNET_IPV6: - fprintf(out, "netsh inetface ipv6 add route %s \"%%INTERFACE%%\"\n", subnet_str); + fprintf(out, "netsh interface ipv6 add route %s \"%%INTERFACE%%\"\n", subnet_str); break; default: