projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make device close cleaner.
[tinc]
/
src
/
tincctl.c
diff --git
a/src/tincctl.c
b/src/tincctl.c
index
5f2b135
..
9fc749b
100644
(file)
--- a/
src/tincctl.c
+++ b/
src/tincctl.c
@@
-246,7
+246,7
@@
static void disable_old_keys(const char *filename, const char *what) {
while(fgets(buf, sizeof buf, r)) {
if(!block && !strncmp(buf, "-----BEGIN ", 11)) {
while(fgets(buf, sizeof buf, r)) {
if(!block && !strncmp(buf, "-----BEGIN ", 11)) {
- if((strstr(buf, " RSA ") && strstr(what, "RSA"))) {
+ if((strstr(buf, "
ED25519 ") && strstr(what, "Ed25519")) || (strstr(buf, "
RSA ") && strstr(what, "RSA"))) {
disabled = true;
block = true;
}
disabled = true;
block = true;
}
@@
-1613,7
+1613,7
@@
static int cmd_config(int argc, char *argv[]) {
if(action < -1) {
if(!found)
fprintf(stderr, "No matching configuration variables found.\n");
if(action < -1) {
if(!found)
fprintf(stderr, "No matching configuration variables found.\n");
- return
0
;
+ return
1
;
}
// Make sure we wrote everything...
}
// Make sure we wrote everything...
@@
-1626,7
+1626,7
@@
static int cmd_config(int argc, char *argv[]) {
if(action < 0 && !removed) {
remove(tmpfile);
fprintf(stderr, "No configuration variables deleted.\n");
if(action < 0 && !removed) {
remove(tmpfile);
fprintf(stderr, "No configuration variables deleted.\n");
- return
*value != 0
;
+ return
1
;
}
// Replace the configuration file with the new one
}
// Replace the configuration file with the new one