projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make more variables safe for use in invitations.
[tinc]
/
src
/
ifconfig.c
diff --git
a/src/ifconfig.c
b/src/ifconfig.c
index
4b47ad1
..
76092a7
100644
(file)
--- a/
src/ifconfig.c
+++ b/
src/ifconfig.c
@@
-134,11
+134,11
@@
void ifconfig_address(FILE *out, const char *value) {
break;
case SUBNET_IPV4:
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:
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:
break;
default:
@@
-199,11
+199,11
@@
void ifconfig_route(FILE *out, const char *value) {
if(*gateway_str) {
switch(subnet.type) {
case SUBNET_IPV4:
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:
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:
break;
default:
@@
-229,11
+229,11
@@
void ifconfig_route(FILE *out, const char *value) {
if(*gateway_str) {
switch(subnet.type) {
case SUBNET_IPV4:
if(*gateway_str) {
switch(subnet.type) {
case SUBNET_IPV4:
- fprintf(out, "netsh in
et
face ipv4 add route %s \"%%INTERFACE%%\" %s\n", subnet_str, gateway_str);
+ fprintf(out, "netsh in
ter
face ipv4 add route %s \"%%INTERFACE%%\" %s\n", subnet_str, gateway_str);
break;
case SUBNET_IPV6:
break;
case SUBNET_IPV6:
- fprintf(out, "netsh in
et
face ipv6 add route %s \"%%INTERFACE%%\" %s\n", subnet_str, gateway_str);
+ fprintf(out, "netsh in
ter
face ipv6 add route %s \"%%INTERFACE%%\" %s\n", subnet_str, gateway_str);
break;
default:
break;
default:
@@
-242,11
+242,11
@@
void ifconfig_route(FILE *out, const char *value) {
} else {
switch(subnet.type) {
case SUBNET_IPV4:
} else {
switch(subnet.type) {
case SUBNET_IPV4:
- fprintf(out, "netsh in
et
face ipv4 add route %s \"%%INTERFACE%%\"\n", subnet_str);
+ fprintf(out, "netsh in
ter
face ipv4 add route %s \"%%INTERFACE%%\"\n", subnet_str);
break;
case SUBNET_IPV6:
break;
case SUBNET_IPV6:
- fprintf(out, "netsh in
et
face ipv6 add route %s \"%%INTERFACE%%\"\n", subnet_str);
+ fprintf(out, "netsh in
ter
face ipv6 add route %s \"%%INTERFACE%%\"\n", subnet_str);
break;
default:
break;
default: