diff options
-rw-r--r-- | lib/sockopt.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/sockopt.c b/lib/sockopt.c index bf3c5d50..a8fae4f1 100644 --- a/lib/sockopt.c +++ b/lib/sockopt.c @@ -674,9 +674,14 @@ sockopt_tcp_signature (int sock_fd, union sockunion *su, const char *password) return (err == 0) ? 0 : -1 ; -#else /* HAVE_TCP_MD5SIG */ +#else + + /* TCP MD5 is not supported */ + + if ((password == NULL) || (*password == '\0')) + return 0 ; /* OK if not required ! */ - errno = ENOSYS ; /* TCP MD5 is not supported */ + errno = ENOSYS ; /* manufactured error */ return -1 ; #endif /* !HAVE_TCP_MD5SIG */ |