diff options
-rw-r--r-- | unix/x0vncserver/x0vncserver.man | 11 | ||||
-rw-r--r-- | unix/xserver/hw/vnc/RFBGlue.cc | 4 | ||||
-rw-r--r-- | win/vncconfig/Connections.h | 9 | ||||
-rw-r--r-- | win/vncconfig/vncconfig.rc | 2 |
4 files changed, 15 insertions, 11 deletions
diff --git a/unix/x0vncserver/x0vncserver.man b/unix/x0vncserver/x0vncserver.man index 87fedf30..095f6db3 100644 --- a/unix/x0vncserver/x0vncserver.man +++ b/unix/x0vncserver/x0vncserver.man @@ -68,14 +68,13 @@ output. .B HostsFile This parameter allows to specify a file name with IP access control rules. The file should include one rule per line, and the rule format is one of the -following: +\fIaddress\fP/\fInetmask\fP (accept connections from the -specified address group), -\fIaddress\fP/\fInetmask\fP (reject connections) -or ?\fIaddress\fP/\fInetmask\fP (query the local user). The first rule +following: +\fIaddress\fP/\fIprefix\fP (accept connections from the +specified address group), -\fIaddress\fP/\fIprefix\fP (reject connections) +or ?\fIaddress\fP/\fIprefix\fP (query the local user). The first rule matching the IP address determines the action to be performed. Rules that include only an action sign (+, - or ?) will match any IP address. -\fINetmask\fP is optional and can be specified either in dotted format -(e.g. /255.255.255.0), or as a single number of bits (e.g. /24). Default is -to accept connections from any IP address. +\fIPrefix\fP is optional and is specified as a number of bits (e.g. /24). +Default is to accept connections from any IP address. . .TP .B SecurityTypes diff --git a/unix/xserver/hw/vnc/RFBGlue.cc b/unix/xserver/hw/vnc/RFBGlue.cc index 09832ab7..a1507924 100644 --- a/unix/xserver/hw/vnc/RFBGlue.cc +++ b/unix/xserver/hw/vnc/RFBGlue.cc @@ -194,7 +194,7 @@ int vncIsTCPPortUsed(int port) std::list<network::TcpListener> dummy; network::createTcpListeners (&dummy, 0, port); } catch (rdr::Exception& e) { - return 0; + return 1; } - return 1; + return 0; } diff --git a/win/vncconfig/Connections.h b/win/vncconfig/Connections.h index 6176f3dc..3d3c06cb 100644 --- a/win/vncconfig/Connections.h +++ b/win/vncconfig/Connections.h @@ -73,8 +73,13 @@ namespace rfb { newPat.buf[1] = 0; _tcscat(newPat.buf, host.buf); - network::TcpFilter::Pattern pat(network::TcpFilter::parsePattern(CStr(newPat.buf))); - pattern.replaceBuf(TCharArray(network::TcpFilter::patternToStr(pat)).takeBuf()); + try { + network::TcpFilter::Pattern pat(network::TcpFilter::parsePattern(CStr(newPat.buf))); + pattern.replaceBuf(TCharArray(network::TcpFilter::patternToStr(pat)).takeBuf()); + } catch(rdr::Exception e) { + MsgBox(NULL, TStr(e.str()), MB_ICONEXCLAMATION | MB_OK); + return false; + } return true; } const TCHAR* getPattern() {return pattern.buf;} diff --git a/win/vncconfig/vncconfig.rc b/win/vncconfig/vncconfig.rc index b49d7440..49585b4c 100644 --- a/win/vncconfig/vncconfig.rc +++ b/win/vncconfig/vncconfig.rc @@ -179,7 +179,7 @@ BEGIN CONTROL "Query",IDC_QUERY,"Button",BS_AUTORADIOBUTTON,7,35,53,15 DEFPUSHBUTTON "OK",IDOK,115,35,50,15 PUSHBUTTON "Cancel",IDCANCEL,170,35,50,15 - LTEXT "e.g. 192.168.0.0/255.255.0.0",IDC_STATIC,65,20,100,15 + LTEXT "e.g. 192.168.0.0/16",IDC_STATIC,65,20,100,15 END IDD_SHARING DIALOG DISCARDABLE 0, 0, 186, 95 |