4b4dbc6d61
This patch updates xmail to the latest version available, and includes a quick fix for IPv6 support in CtrlClnt (XMail's control client) commandline utility. Signed-off-by: Luis Dallos <ld@nkvd.ignorelist.com> git-svn-id: svn://svn.openwrt.org/openwrt/packages@39499 3c298f89-4303-0410-b956-a3cf2f4a3e73
57 lines
1.7 KiB
Diff
57 lines
1.7 KiB
Diff
--- a/CTRLClient.cpp
|
|
+++ b/CTRLClient.cpp
|
|
@@ -53,7 +53,7 @@ struct CClnChannelCfg {
|
|
/* Needed by library functions ( START ) */
|
|
bool bServerDebug = false;
|
|
int iLogRotateHours = 24;
|
|
-int iAddrFamily = AF_INET;
|
|
+int iAddrFamily = SYS_INET64;
|
|
static char const * const pszCClnErrors[] = {
|
|
"Wrong command line usage",
|
|
"Either none or both private key and certificate file must be supplied"
|
|
@@ -349,7 +349,7 @@ int CClnLogError(int iError)
|
|
void CClnShowUsage(char const *pszProgName)
|
|
{
|
|
fprintf(stderr,
|
|
- "use : %s [-snuptfSLcKCXHD] ...\n"
|
|
+ "use : %s [-snuptfSLcKCXHD4657] ...\n"
|
|
"options :\n"
|
|
" -s server = set server address\n"
|
|
" -n port = set server port [%d]\n"
|
|
@@ -364,7 +364,11 @@ void CClnShowUsage(char const *pszProgNa
|
|
" -X filename = set the SSL certificate-list file\n"
|
|
" -H dir = set the SSL certificate-store directory\n"
|
|
" -c = disable MD5 authentication\n"
|
|
- " -D = enable debug\n",
|
|
+ " -D = enable debug\n"
|
|
+ " -4 = connect only to IPv4 addresses\n"
|
|
+ " -6 = connect only to IPv6 addresses\n"
|
|
+ " -5 = prefer IPv4 addresses over IPv6 addresses\n"
|
|
+ " -7 = prefer IPv6 addresses over IPv4 addresses\n",
|
|
pszProgName, STD_CTRL_PORT, STD_CTRL_TIMEOUT);
|
|
}
|
|
|
|
@@ -467,6 +471,22 @@ int CClnExec(int iArgCount, char *pszArg
|
|
bServerDebug = true;
|
|
break;
|
|
|
|
+ case '4':
|
|
+ iAddrFamily = AF_INET;
|
|
+ break;
|
|
+
|
|
+ case '6':
|
|
+ iAddrFamily = AF_INET6;
|
|
+ break;
|
|
+
|
|
+ case '5':
|
|
+ iAddrFamily = SYS_INET46;
|
|
+ break;
|
|
+
|
|
+ case '7':
|
|
+ iAddrFamily = SYS_INET64;
|
|
+ break;
|
|
+
|
|
default:
|
|
return CCLN_ERR_BAD_USAGE;
|
|
}
|