Skip to contentSkip to conversation

PATCH: tcp port binding and others

Openvpn-devel Ewan Bhamrah Harley 1 participant 1 message Aug 9, 2005

lore
Share & tools
lore
#0 lore raw

James, as requested the attached patch is merged with 2.1alpha3.

The patch:

* Adds a new --bind option to compliment the existing --nobind options. Implicit bind/nobind defaults are left unchanged.

* enables --local and --lport on tcp-client connections

* fixes a bug with the local_port value passed to scripts/plugins - previously this was incorrectly set to the default port if nobind was used - the patch sets it to '0' in this case.

* Also, the patch adds passing of http/socks proxy address and port information to scripts/plugins.

* Updates to manpage and help to reflect the changes in the patch.

Rgds
Ewan

openvpn.8 +13 -2
diff -Naur openvpn-2.1_alpha3/openvpn.8 openvpn-2.1_alpha3_patched/openvpn.8
@@ -187,6 +187,7 @@
 [\ \fB\-\-nice\fR\ \fIn\fR\ ]
 [\ \fB\-\-no\-iv\fR\ ]
 [\ \fB\-\-no\-replay\fR\ ]
+[\ \fB\-\-bind\fR\ ]
 [\ \fB\-\-nobind\fR\ ]
 [\ \fB\-\-ns\-cert\-type\fR\ \fIclient|server\fR\ ]
 [\ \fB\-\-passtos\fR\ ]
@@ -430,7 +431,7 @@
 .\"*********************************************************
 .TP
 .B --local host
-Local host name or IP address.
+Local host name or IP address for bind.
 If specified, OpenVPN will bind to this address only.
 If unspecified, OpenVPN will bind to all interfaces.
 .\"*********************************************************
@@ -701,13 +702,23 @@
 .\"*********************************************************
 .TP
 .B --lport port
-TCP/UDP port number for local.
+TCP/UDP port number for bind.
 .\"*********************************************************
 .TP
 .B --rport port
 TCP/UDP port number for remote.
 .\"*********************************************************
 .TP
+.B --bind
+Bind to local address and port. This is the default unless any of 
+.B --proto tcp-client
+,
+.B --http-proxy
+or
+.B --socks-proxy
+are used.
+.\"*********************************************************
+.TP
 .B --nobind
 Do not bind to local address and port.  The IP stack will allocate
 a dynamic port for returning packets.  Since the value of the dynamic port
options.c +48 -2

93 lines not on this page · raw message

options.h +1 -0
diff -Naur openvpn-2.1_alpha3/options.h openvpn-2.1_alpha3_patched/options.h
@@ -120,6 +120,7 @@
   struct remote_list *remote_list;
   bool remote_random;
   const char *ipchange;
+  bool bind_defined;
   bool bind_local;
   const char *dev;
   const char *dev_type;
socket.c +32 -11

80 lines not on this page · raw message