Commit Graph

1426 Commits

Author SHA1 Message Date
Hamish Coleman
fff50a7d80 Ensure the code style is kept 2023-10-24 11:20:13 +01:00
Hamish Coleman
d2bafa716d Fix API initialisation to actually ignore invalid packets or passwords 2023-10-24 11:20:13 +01:00
Hamish Coleman
c552db6443 Fix last seen edge case 2023-10-24 11:20:13 +01:00
Hamish Coleman
beb14c8d70 Dont treat bools as a magic number and simplify negated tests where possible 2023-10-24 11:20:13 +01:00
Hamish Coleman
1a598fa43b Ensure that we initialise the purgeability of peer structures when we allocate them 2023-10-24 11:20:13 +01:00
Hamish Coleman
e9659e3b9a Add a last_seen column to n2n-ctl with human readable values 2023-10-24 11:20:13 +01:00
Alfredo Cardigliano
4f54649eeb PR template 2023-10-19 09:32:52 +02:00
Luca Deri
cd7b3b4661 Added prerequisite 2023-08-31 08:19:34 +02:00
Hamish Coleman
b0d742b3f5 Remove the need for autoconf in the debian package
Continuing to try and simplify the build system, calculate the remaining
two autoconf variables from the existing config.mak.

For the moment, leave a configure and configure.ac file in place to
allow any old build systems to continue to function without errors.
2023-08-30 20:27:14 +01:00
Hamish Coleman
018add0280 Use a simple debian/control Architecture
By switching to the "any" architecture, we no longer need to template
the debian/control file.  This simply claims that the package can be
built on any known debian arch - which we currently think is true - so
it will help future portability.
2023-08-30 20:27:14 +01:00
Hamish Coleman
d7eff5313b Add a hack for the github builders 2023-08-30 20:27:14 +01:00
Hamish Coleman
9d4f68fce2 Regenerate packages configure scripts 2023-08-30 20:27:14 +01:00
Hamish Coleman
cee0431a61 Work around ubuntu build environment
TODO:
- dont just ignore missing info, have something to fill it in even when
  the require arch binaries are missing
2023-08-30 20:27:14 +01:00
Hamish Coleman
f2597e8f42 Install some packages for cross compiling 2023-08-30 20:27:14 +01:00
Hamish Coleman
231f4d9ed0 Remove unneeded debian/files - it is autogenerated 2023-08-30 20:27:14 +01:00
Hamish Coleman
1b862513ff Regenerate packages configure scripts 2023-08-30 20:27:14 +01:00
Hamish Coleman
c2f08642c0 Remove unneeded templating of systemd units 2023-08-30 20:27:14 +01:00
Hamish Coleman
50748f210a Remove unneeded templating of debian/rules 2023-08-30 20:27:14 +01:00
Hamish Coleman
0385d4fcbe Automatically generate debian changelog 2023-08-30 20:27:14 +01:00
Hamish Coleman
3cb57e2a6e Use dh_shlibdeps to calculate depends
This may impact builds on Debian 8, but that version has been out of
support for over three years.  I didnt test it, but since using this
helper is the preferred method it may actually help builds on older
versions.
2023-08-30 20:27:14 +01:00
Hamish Coleman
ecb869517e Remove static definition from deb package builder 2023-08-30 20:27:14 +01:00
shaxxx
7c107887f4 Fix auto IP tracking 2023-08-27 15:04:39 +01:00
Hamish Coleman
f79153166b Concentrate more windows wierdness in one place - allowing proper ordering of crazy defs and includes 2023-08-03 21:40:31 +01:00
Hamish Coleman
65359c7916 Add a missing library function 2023-08-03 21:40:31 +01:00
Hamish Coleman
5514d91976 For some reason, these headers dont work for 64bit - windows is strange 2023-08-03 21:40:31 +01:00
Hamish Coleman
5eaf7fca8b Add windows XP to regular cross-compile tests 2023-08-03 21:40:31 +01:00
Hamish Coleman
567ae8db6b Try to simplify and improve windows objs definitions 2023-08-03 21:40:31 +01:00
Hamish Coleman
3bf584c580 Add tweaks to support windows XP 2023-08-03 21:40:31 +01:00
Hamish Coleman
439939dc7b Simplify tuntap_open by using one function prototype for all OS 2023-08-03 21:40:31 +01:00
Hamish Coleman
6b8ba8aa94 Move the examples to their own directory 2023-07-31 20:56:49 +01:00
Hamish Coleman
6ddaaaa917 Move win32 specific file to the right dir 2023-07-31 20:56:49 +01:00
Hamish Coleman
83078c8104 Simplify win32 build process
When building on win32 systems, simply add the win32 specific functions
to the libn2n.a, which simplifies the commands needed.

By moving the win32 source code into the src directory, the source code
is better consolidated.
2023-07-31 20:56:49 +01:00
Hamish Coleman
6957b16537 Address compiler warning on older gcc 2023-07-06 02:54:36 +08:00
Hamish Coleman
183e0c969a Hack around the "helpful" exe file suffix
If there is a way to turn off the mingw insistence that it will rewrite
the filename it was given in the "-o" options, I have not been able to
find it.  I could easily handle all the moves or renames at the end of
the build process if I could turn off this feature.  Especially since it
means that make often thinks that the file has not been built (the
filename that make knows about is not the file that actually gets built
by the mingw gcc, so the if-newer tests that make applies will always
fail)
2023-07-03 02:51:20 +08:00
Hamish Coleman
84dac6220b Add a cross-compiled 64bit windows build to CI 2023-07-03 02:51:20 +08:00
Hamish Coleman
e16911d6ec The arm64 build has now been tested on real hardware 2023-07-03 02:51:20 +08:00
Hamish Coleman
0b662fc0f4 A bunch of hacks to allow builds to understand the stupid windows filenames 2023-07-03 02:51:20 +08:00
Hamish Coleman
4d2e92ac81 Ensure library is included in correct order
It looks to me that the correct way to address this build wrinkle is
simply to add the win32 functions to the libn2n when building a win32
output, then there is no additional magic library juggling required for
the win32 case
2023-07-03 02:51:20 +08:00
Hamish Coleman
1e8a085f1e Refactor to use the host triplet instead of CONFIG_TARGET 2023-07-03 02:51:20 +08:00
Hamish Coleman
59ecadcab2 Move the special windows lib config into the configure script 2023-07-03 02:51:20 +08:00
Hamish Coleman
b22c57a16f Dont require special build flags for just one header 2023-07-03 02:51:20 +08:00
Hamish Coleman
e79616dc8b Dont include unneeded headers 2023-07-03 02:51:20 +08:00
Hamish Coleman
85c8ab536c Convert final user of TARGET==darwin to use the cross-compile variables instead 2023-07-03 02:51:20 +08:00
Hamish Coleman
4b4311e2fa Move the macos default install path config.
There is a minor change - after this, the macos man pages are also
installed into the /usr/local PREFIX.  This seems like the correct
location to me.

Longer term, the usual autotools process of installing everything into
/usr/local should be used.  Files installed in /usr should be done by
a package management tool, so this default makes sense to use.
2023-07-03 02:51:20 +08:00
Hamish Coleman
15fe4f786f Move OpenSolaris special config to the configure script 2023-07-03 02:51:20 +08:00
Hamish Coleman
8dcc879ca0 Simplify config and build process for libpcap tool 2023-07-02 22:18:09 +08:00
Hamish Coleman
433b14c52f Simplify openssl library detection and macros 2023-07-02 22:18:09 +08:00
Hamish Coleman
f05c24b259 Fix openssl support and add it to tests 2023-07-01 19:08:43 +08:00
Hamish Coleman
473b89c963 Simplify build system by using standard macro
Most environments have predefined macros that identify the environment
to the source code.  If we use these macros instead of defining our own
then there is one less parameter difference to keep track of with
different builds

cf:
    http://web.archive.org/web/20191012035921/http://nadeausoftware.com/articles/2012/01/c_c_tip_how_use_compiler_predefined_macros_detect_operating_system
    https://sourceforge.net/p/predef/wiki/OperatingSystems/
2023-07-01 19:08:43 +08:00
Hamish Coleman
041233dc8b Address more windows compile warnings 2023-06-29 06:00:56 +08:00