57 Commits

Author SHA1 Message Date
ebf647e37b Allow connecting to remote IPv6 hosts for TCP or UDP
This alone should allow interacting with IPv4 firewalling rules over
IPv6, for these two protocols.
2018-06-14 18:30:27 -04:00
1062021957 Fix typo in a comment 2018-04-25 03:48:24 +02:00
Jonathan Bennett
a554f0d685 Disable ipv6 dns resolution in the client 2016-04-24 21:51:13 -05:00
Jonathan Bennett
d939deb811 Spelling corrections, found using the codespell tool. 2016-04-10 12:03:59 -05:00
Jonathan Bennett
9475b625a0 Add Doxygen headers to client files 2016-01-01 02:13:21 +00:00
Michael Rash
a85b081f79 copyright update 2015-12-23 14:34:51 -05:00
Michael Rash
b03c007c44 [client] add --server-resolve-ipv4 to only accept IPv4 addresses from DNS for the SPA server 2015-09-27 10:17:36 -04:00
Michael Rash
82464574a6 [client] minor update to make chksum() static 2015-08-18 22:12:23 -04:00
Michael Rash
0d83c967c0 [client] minor typo fixes 2015-06-09 11:31:51 -04:00
Michael Rash
136d017afb [client] ensure no dns, http, or other network comms in AFL fuzzing mode 2015-05-14 17:51:25 -07:00
Michael Rash
e1608b90fe [client] call freeaddrinfo() early after iterating through getaddrinfo() results 2014-07-22 22:35:43 -04:00
Michael Rash
666d150aff [client] make close() on socket handle more intuitive (resolves 'double close' bugs flagged by Coverity) 2014-07-22 22:04:44 -04:00
Michael Rash
7df1186c66 fixed several socket handle leaks under error conditions spotted by Coverity 2014-07-22 11:30:33 -04:00
Michael Rash
d327f99efb [client] minor typo fix 2014-04-08 21:06:18 -04:00
Michael Rash
9e990c9be0 fix header non-ascii chars, and introduce test suite support for detecting this in source files 2014-03-14 09:14:35 -04:00
Michael Rash
be971e2ec8 [client] bug fix to convert UDP length header field to network byte order in UDP raw mode 2014-03-09 18:58:22 -04:00
Michael Rash
bfdbb8f260 Updated authorship and copyright information
This commit updates all authorship and copyright information to include a
standard header that references the AUTHORS and CREDITS file. This standard
header was written by the Debian legal team at the request of Franck Joncourt.
2014-03-04 17:53:10 -05:00
Michael Rash
1e77f6ed53 continued changes to zero out sensitive information before exit (#93) 2013-07-07 22:32:30 -04:00
Franck Joncourt
c2e1a00154 s/GNU Public/GNU General Public/g 2013-06-30 22:21:22 +02:00
Michael Rash
68acbaadc4 remove newline chars from log_msg() calls 2013-06-19 23:42:58 -04:00
Michael Rash
382099e85a Updated copyright dates, removed NEWS file in favor of the ChangeLog 2013-06-02 14:07:01 -04:00
Michael Rash
52462e7dba Use {0} initializer for all stack allocated char arrays
Lots of places in the code were already using {0} to initialize stack char
arrays, but memset() was being used as well.  This commit removes all
unnecessary memset() calls against char arrays that are already initialized
via {0} (which sets all members to zero for such arrays).
2013-05-21 22:00:15 -04:00
Michael Rash
0a279ccbfc [client] minor --verbose display update to say source port is 'OS assigned' when not otherwise set 2013-05-18 22:49:38 -04:00
Michael Rash
9f9bbcbcdd fixed several resource leak conditions found by Coverity 2013-05-09 17:15:58 -04:00
Franck Joncourt
a9a143a85d Merge remote-tracking branch 'upstream/master' 2013-05-06 11:52:35 +02:00
Damien Stuart
15d9c6197b Fixes to get hmac_support and 2.5 changes working for the Windows lib and client builds. 2013-05-05 13:20:20 -04:00
Franck Joncourt
fca497f0d8 New tests for rc file processing (SPA_SOURCE_PORT, FW_TIMEOUT).
Added spa source port variable to dump_transmit_options() and renamed port
to destination port.
2013-05-01 15:29:17 +02:00
Franck Joncourt
d93648cf99 Moved/Created proto_intostr() and proto_strtoint() to utils.c.
This allows to update dump_transmit_options() to use the log module to dump data.
2013-04-30 22:22:03 +02:00
Franck Joncourt
7a719389ca Integrated the log module in the whol client source code.
perror() is also replaced by log_msg()
2013-04-29 22:18:29 +02:00
Michael Rash
dd05975217 Merge remote-tracking branch 'fjoncourt/master'
This merges changes from Franck Joncourt for issues #55 (log module for fwknop)
and #64 (hostname resolution not working for -P icmp spoofing).
2013-04-27 22:26:38 -04:00
Franck Joncourt
b04de687ce Fixed hostname resolution while spoof ip is used.
mrash/fwknop#64
2013-04-27 23:31:40 +02:00
Michael Rash
b3f55bf1ab Convert most strlcpy() calls to use destination bound from sizeof()
This commit helps to ensure correctness of strlcpy() calls in support of fixing
issue #2.
2013-04-27 15:08:11 -04:00
Michael Rash
a413c6cf94 Continue atoi() replacement with strtol() wrapper, closes issue #21
This commit completes the conversion to the strtol() wrapper function in order
to remove all atoi() calls.  In addition, variable max values are enforced
using more broadly defined RCHK_* values.
2013-02-19 23:11:01 -05:00
Michael Rash
1afc8db96a Added strtol_wrapper() libfko utility function for atoi() replacement (#21)
This commit replaces most atoi() calls (which don't report errors) with a strtol()
wrapper function for stronger string -> integer conversion validation.
2013-02-18 19:32:53 -05:00
Michael Rash
307cb84323 port strlen bugfix 2013-01-18 22:11:32 -05:00
Michael Rash
47ea800889 merged in fwknop-2.0.4 changes 2013-01-18 17:25:16 -05:00
Michael Rash
e4751d1c20 added icmp type/code blurb 2012-10-11 23:40:04 -04:00
Michael Rash
ecce80b92b [client] for spoofed SPA packets over ICMP, switche back to sending over echo reply 2012-10-04 21:05:22 -04:00
Michael Rash
229a36625b Better IP spoofing support (udpraw and icmp)
- [client] Added '-P udpraw' to allow the client to send SPA packets over
  UDP with a spoofed source IP address.  This is in addition to the
  original 'tcpraw' and 'icmp' protocols that also support a spoofed
  source IP.
- [server] Bug fix to accept SPA packets over ICMP if the fwknop client
  is executed with '-P icmp' and the user has the required privileges.
2012-10-03 22:56:10 -04:00
Michael Rash
1548cbafc8 get MAX_PORT_STR_LEN constant from fko_message.h 2012-08-31 23:05:05 -04:00
Michael Rash
d739331818 implemented a couple of minor stronger bounds checks 2012-08-30 23:38:54 -04:00
Michael Rash
84e036f95b Change HTTP connection type to 'close' in -R mode
Applied patch from Jonathan Schulz to change the HTTP connection type to
'close' for the client in -R mode.
2012-08-01 23:27:34 -04:00
Michael Rash
044ea54d93 updated client SPA verbose message to include the server IP/host 2011-10-29 23:49:29 -04:00
Michael Rash
6388e8ac7f added 'const' to function prototype vars where possible
Added the 'const' qualifier to function prototype variables where possible.
In addition, reduced some functions to file-scope with 'static' where possible.

Also made a few minor changes to remove extra whitespace, and fixed a bug
in create_fwknoprc() to ensure the new fwknoprc filehandle is closed.
2011-10-25 21:00:40 -04:00
Michael Rash
db681fb791 minor commit to fix minor compilations warnings 2011-08-19 22:00:16 -04:00
Michael Rash
ca5f82c067 Removed legacy $Id$ tags from svn
$Id$ tags don't really mean anything to git so they have been removed from all
source files.
2011-06-18 20:53:40 -04:00
Damien Stuart
d8f282143e Removed unnecessary include.
git-svn-id: file:///home/mbr/svn/fwknop/trunk@308 510a4753-2344-4c79-9c09-4d669213fbeb
2011-01-01 21:00:24 +00:00
Damien Stuart
0f6ca00ac4 Updated the GPL blurb at the top of the source files. Added some missing copyright statements (Thanks to Franck Joncourt).
git-svn-id: file:///home/mbr/svn/fwknop/trunk@300 510a4753-2344-4c79-9c09-4d669213fbeb
2010-11-13 03:04:36 +00:00
Damien Stuart
b0886a1d49 Updates and clean-up to address the many compiler warnings when compiled with -Wall. Also some autoconf updates
git-svn-id: file:///home/mbr/svn/fwknop/trunk@265 510a4753-2344-4c79-9c09-4d669213fbeb
2010-07-16 14:28:32 +00:00
Damien Stuart
e63f1de1e3 Removed unreferenced variables.
git-svn-id: file:///home/mbr/svn/fwknop/trunk@242 510a4753-2344-4c79-9c09-4d669213fbeb
2010-07-07 17:36:20 +00:00