Closed nesro closed 8 years ago
I tried MLVPN with a 5-digit port , but it has been trimmed to 4-digit number.
I did not debug the code, since my change solved the problem. But this is my guess what went wrong:
char destport[MLVPN_MAXPORTSTR]; strlcpy(tmptun->destport, dstport, sizeof(tmptun->destport));
strlcpy guarantee to NUL-terminate the result, which leaves only 4 characters for the port
That's right.
Thank you for your contribution
I tried MLVPN with a 5-digit port , but it has been trimmed to 4-digit number.
I did not debug the code, since my change solved the problem. But this is my guess what went wrong:
define MLVPN_MAXPORTSTR 5
char destport[MLVPN_MAXPORTSTR]; strlcpy(tmptun->destport, dstport, sizeof(tmptun->destport));
strlcpy guarantee to NUL-terminate the result, which leaves only 4 characters for the port