Commit Graph
18 Commits
Author SHA1 Message Date
Kevin CernekeeandNikos Mavrogiannopoulos 370fa01de6 gssapi: Don't include gssapi header files if !HAVE_GSSAPI
This fixes:

      CC       auth/gssapi.o
    auth/gssapi.c:30:27: fatal error: gssapi/gssapi.h: No such file or directory
     #include <gssapi/gssapi.h>
                               ^
2015-02-19 11:47:20 +01:00
Kevin CernekeeandNikos Mavrogiannopoulos 2e757cedb2 Use distinct remote and local IPs when explicit_ipv[46] is specified
Currently the code sets the local interface IP to the same value as the
P-t-P IP:

tun0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          inet addr:192.168.63.1  P-t-P:192.168.63.1  Mask:255.255.255.0
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1341  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

This doesn't seem to get things routed correctly.  e.g. pinging 192.168.63.1
from the ocserv gateway just loops traffic back to the local machine instead
of pinging the client.

So instead we'll set LIP = RIP + 1.  This isn't terribly intuitive (an
administrator might try to number consecutive users 192.168.1.1, 192.168.1.2,
192.168.1.3, ...) but it's better than the current situation.  Maybe at some
point, fixed IPs should also make use of the hash table.
2015-02-10 10:43:49 +01:00
Kevin CernekeeandNikos Mavrogiannopoulos 25cfd3b1db config: Use talloc_free() to free "route" strings
Adding redundant routes triggers a glibc assertion on startup.  The offending
config file contained:

    route = 192.168.1.0/255.255.255.0
    route = default

The assertion:

    # ./src/ocserv -c ocserv.conf -f
    *** Error in `./src/ocserv': munmap_chunk(): invalid pointer: 0x0000000001703470 ***
    Aborted (core dumped)

Fix this by calling the correct free() function.
2015-02-09 15:06:57 +01:00
Kevin CernekeeandNikos Mavrogiannopoulos 71ff05cea7 Allow explicit-ipv4 / explicit-ipv6 addresses in per-user config files
If a machine is running remotely accessible services, it can be helpful
to assign a fixed IP address upon connection.
2015-02-09 11:32:24 +01:00
Kevin CernekeeandNikos Mavrogiannopoulos 1545130237 main: Check chdir() return value
This fixes:

    main.c: In function ‘main’:
    main.c:1025:8: warning: ignoring return value of ‘chdir’, declared with attribute warn_unused_result [-Wunused-result]
       chdir(s->config->chroot_dir);
            ^
2015-02-09 11:31:52 +01:00
Kevin CernekeeandNikos Mavrogiannopoulos fbe55c23ef main: Fix unused variable warning on !HAVE_LIBSYSTEMD builds
This fixes:

      CC       main.o
    main.c: In function ‘listen_ports’:
    main.c:276:11: warning: unused variable ‘fds’ [-Wunused-variable]
      int ret, fds;
               ^
2015-02-09 11:31:18 +01:00
Kevin CernekeeandNikos Mavrogiannopoulos 8e67f959ed Add missing GnuTLS header file
sec-mod.h now uses gnutls_privkey_t, so include <gnutls/abstract.h> to
fix this error:

      CC       main-misc.o
    In file included from main-misc.c:43:0:
    ./sec-mod.h:31:2: error: unknown type name ‘gnutls_privkey_t’
      gnutls_privkey_t *key;
      ^
2014-05-21 06:17:09 +02:00
Kevin CernekeeandNikos Mavrogiannopoulos f6e7341fe1 Remove unnecessary AnyConnect /2/* files
As long as all of our supported OSes are listed under /1/*, the /2/*
files can be omitted.
2014-01-01 19:22:54 +01:00
Kevin CernekeeandNikos Mavrogiannopoulos f928a11cd0 Add support for Mac AnyConnect client
Populate the 0-byte /1/Darwin_i386 file to prevent the following error:

    The AnyConnect package on the secure gateway could not be located.
    You may be experiencing network connectivity issues.  Please try
    connecting again.

Tested with AnyConnect 3.1.03103.
2014-01-01 19:22:39 +01:00
Kevin CernekeeandNikos Mavrogiannopoulos c692943289 Fix auto-update regression on AnyConnect clients
If /1/<OS> exists for every valid OS, then the client will never even try
to request /2/binaries/update.txt.  Instead, it will request
/1/binaries/update.txt, and then get very confused when the response
looks like an XML document instead of a version string.
2014-01-01 19:22:24 +01:00
Kevin CernekeeandNikos Mavrogiannopoulos 3697b1c51a README: Update dependencies 2014-01-01 19:22:12 +01:00
Kevin CernekeeandNikos Mavrogiannopoulos 1176d2b7b8 Fix multiple session disconnect when max-same-clients is 0
max-same-clients is used to limit the number of outstanding sessions
(cookies).  If set to 0, it means an unlimited number of active cookies
can be owned by each user.  But it doesn't mean that the same cookie
can be reused for multiple CSTP connections with different IPs, as
the protocol does not normally work this way.
2013-12-11 08:35:34 +01:00
Kevin CernekeeandNikos Mavrogiannopoulos 972bce3bde README: Add info on build dependencies 2013-12-01 11:07:23 +01:00
Kevin CernekeeandNikos Mavrogiannopoulos 3e263573ab Add build-aux/.gitignore 2013-12-01 11:06:20 +01:00
Kevin CernekeeandNikos Mavrogiannopoulos c91ae911ee Remove autogenerated scripts from git repo
These get dirtied every time somebody runs autogen.sh.
2013-12-01 11:05:33 +01:00
Kevin CernekeeandNikos Mavrogiannopoulos b38a82873b Add X-CSTP-License header for mobile client compatibility
The Android AnyConnect client passes authentication but refuses to
establish a VPN link if this header is missing.
2013-12-01 11:02:33 +01:00
Kevin CernekeeandNikos Mavrogiannopoulos 190e1d7994 bypass AnyConnect client auto-update mechanism 2013-07-07 23:14:26 +02:00
Kevin CernekeeandNikos Mavrogiannopoulos 0de1a803d3 add missing GnuTLS version checks around >= v3.2.0 features 2013-07-07 23:12:24 +02:00