aboutsummaryrefslogtreecommitdiff
path: root/push.c
diff options
context:
space:
mode:
authorEnrico Scholz <enrico.scholz@sigma-chemnitz.de>2010-02-28 14:40:57 +0100
committerDavid Sommerseth <dazo@users.sourceforge.net>2010-04-29 20:22:07 +0200
commitaeb700f6f33bd7d8a1fdfe92d12e706dad1069b0 (patch)
tree9e0cbcc17cfa58f5f885abea32f2ef0f31818e8c /push.c
parentremove duplicate code in FREEBSD+DRAGONFLY system-dependent ifconfig (diff)
downloadopenvpn-aeb700f6f33bd7d8a1fdfe92d12e706dad1069b0.tar.xz
Allow 'lport 0' setup for random port binding
I am running a multihomed host where 'local <extip>' must be specified for proper operation. Unfortunately, this implies 'lport 1194' or another static port. This causes problems with stateful firewalls which register the host/port pairs in the internal connection tracking table. On ungraceful reconnects, the new TCP connection will have same the host/port pairs but unexpected sequence numbers. The new connection will be assumed as invalid hence and be dropped. It would be nice when local port can be configured to be bound to a random port number. After reading code, | else if (streq (p[0], "lport") && p[1]) | ... | port = atoi (p[1]); |- if (!legal_ipv4_port (port)) |+ if (port != 0 && !legal_ipv4_port (port)) | { in options.c seems to be the only required change. This has been discussed here: <http://thread.gmane.org/gmane.network.openvpn.user/28622> Signed-off-by: David Sommerseth <dazo@users.sourceforge.net> Acked-by: Gert Doering <gert@greenie.muc.de>
Diffstat (limited to 'push.c')
0 files changed, 0 insertions, 0 deletions