2367 Commits

Author SHA1 Message Date
Michael Rash
8edad8b583 [extras] update Coverity version to 7.7.0 for interface script 2015-08-16 21:27:14 -04:00
Michael Rash
f3b25bdc24 [test suite] require custom config paths for sudo tests 2015-08-16 21:06:26 -04:00
Damien Stuart
743d861c67 Updated version in the spec file. 2015-08-14 16:49:07 -04:00
Michael Rash
e5c6f96788 [server] fix compilation issue for non-iptables firewalls 2015-07-25 23:10:06 -04:00
Michael Rash
47851dffdd [test suite] use pgrep for fwknopd check at init time 2015-07-25 19:17:10 -07:00
Michael Rash
8e7dd29280 Merge branch 'master' of ssh://192.168.10.1/home/mbr/git/fwknop 2015-07-25 19:00:48 -07:00
Michael Rash
72555ba9fe [server] minor comment fix for group ID determination in access.conf parsing 2015-07-25 18:58:39 -07:00
Michael Rash
fbdc542f48 Merge branch 'master' of https://github.com/mrash/fwknop 2015-07-25 13:28:49 -07:00
Michael Rash
db3a8c39e4 Merge branch 'master' of https://github.com/mrash/fwknop 2015-07-25 16:28:23 -04:00
Michael Rash
c0330e5c8b [server] additional work on splitting incoming_spa() loop into functions 2015-07-25 13:27:42 -07:00
Michael Rash
591d400216 [test suite] fix sudo user tests 2015-07-25 13:26:50 -07:00
Michael Rash
3270900a38 [server] continued work on splitting incoming_spa() into functions 2015-07-24 12:38:17 -07:00
Michael Rash
6116419e21 [test suite] ensure HMAC key string is equal to SHA512_BLOCK_LEN in length (fixes ASAN warning) 2015-07-24 10:43:53 -07:00
Michael Rash
dff7b82daf Merge pull request #166 from micha137/patch-1 2015-07-22 11:06:08 -04:00
Michael Rash
01beb31861 [server] start to split incoming_spa() main loop into functions 2015-07-22 06:57:13 -07:00
Michael Rash
d681485e29 [server] add sudo support, closes #159 2015-07-22 04:08:58 -07:00
micha137
0ac52b9b4d Fix some typos 2015-07-21 18:39:43 +02:00
Michael Rash
89b2e8f477 [server] interface goes down will cause fwknopd to exit
By default, fwknopd will now exit if the interface that it is
sniffing goes down (patch contributed by Github user 'sgh7'). If this
happens, it is expected that the native process monitoring feature in
things like systemd or upstart will restart fwknopd. However, if fwknopd
is not being monitored by systemd, upstart, or anything else, this
behavior can be disabled with the EXIT_AT_INTF_DOWN variable in the
fwknopd.conf file. If disabled, fwknopd will try to recover when a
downed interface comes back up.
2015-07-18 13:11:25 -07:00
Michael Rash
15c00692b7 Merge pull request #164 from Coacher/master 2015-07-18 23:43:00 -04:00
Ilya Tumaykin
8647854efe extras: add systemd unit file and tmpfiles.d configuration for fwknopd 2015-07-19 06:18:54 +03:00
Michael Rash
795b1de4dd [server] Added RULES_CHECK_THRESHOLD to define 'deep' rule expiration check frequency
The RULES_CHECK_THRESHOLD variable defines the number of times firewall rule
expiration times must be checked before a "deep" check is run. This allows
fwknopd to remove rules that contain a proper '_exp_<time>' even if a third party
program added them instead of fwknopd. The default value for this variable is 20,
and this typically results in this check being run every two seconds or so. To
disable this type of checking altogether, set this variable to zero.
2015-07-18 10:37:17 -07:00
Michael Rash
295a6a0d14 [server] fix is_digits() logic and add tests 2015-07-17 21:28:02 -07:00
Michael Rash
76d8ce5158 minor change to remove debugging statement 2015-07-17 12:17:48 -07:00
Michael Rash
6e4ad4767f [server] make sure fw _exp_NNN... strings contain only digits after the _exp_ prefix 2015-07-17 12:15:01 -07:00
Michael Rash
b753812cf6 [server] minor addition of function names to fw command error log messages 2015-07-17 11:48:28 -07:00
Michael Rash
a8ef2922e6 Merge branch 'master' of https://github.com/mrash/fwknop 2015-07-17 10:56:28 -07:00
Michael Rash
c25f951b42 Merge pull request #161 from sgh7/master
[server] daemon exits if listened-to interface goes down
2015-07-17 22:37:59 -04:00
Michael Rash
4169c6d477 [server] switch chain_exists() log message to LOG_DEBUG upon error since FWKNOP_INPUT almost never exists at startup 2015-07-17 10:38:34 -07:00
Michael Rash
e7b48af47c [server] Calculate payload length from IP header
Github user Scotte noticed that in his setup a 'VSS-Monitoring ethernet trailer'
was being added to incoming Ethernet frames that contained SPA packets. This
caused base64 decoding to break because the packet data length was calculated
from what libpcap returned for the frame (so these bytes became included in the
SPA payload itself). This issue was reported as #163 on github.

This commit has fwknopd calculate the SPA payload length using the length field
in the IP header so that any trailing bytes in the Ethernet frame are not
included. This solution also applies to the Ethernet Frame Check Sequence issue
(#126).
2015-07-16 23:02:50 -07:00
Michael Rash
042bf2d438 bump version to 2.6.7 (getting close to 2.6.7-pre1) 2015-07-16 11:59:34 -07:00
Michael Rash
71d6f01d11 [server] further no_chk_support for issue #162 2015-07-16 11:49:04 -07:00
Michael Rash
3c8e03d062 [server] add stronger 'no -C' support for firewalld systems (issue #162) 2015-07-16 11:39:14 -07:00
Michael Rash
72f03ae99c [test suite] fix 'FORWARD_ALL SNAT translate IP' test 2015-07-14 21:50:11 -04:00
Michael Rash
43f38551c9 [test suite] add ASAN mode to fko-wrapper 2015-07-14 21:26:44 -04:00
Michael Rash
fd07a95880 add test/tests/address_sanitizer.pl 2015-07-14 21:14:54 -04:00
Michael Rash
f1c3806dca [test suite] added tests for duplicate rule detection (issue #162) 2015-07-14 21:13:46 -04:00
Michael Rash
3de56f8f89 [test suite] add valgrind string to client command line for garbage collection test 2015-07-13 22:41:21 -04:00
Michael Rash
588cba6063 [test suite] validate iptables rule garbage collection (added in ef9498f7) 2015-07-13 21:59:58 -04:00
Michael Rash
ef9498f783 [server] Implement garbage cleanup mode for rule deletion
This is a significant commit that allows fwknopd to delete expired rules
from the firewall policy regardless of whether fwknopd is tracking them.
That is, a third party program could insert rules into the fwknopd
chains (iptables for now, but this will be extended to the other
firewalls) in order to take advantage of fwknopd rule deletion.
2015-07-13 21:29:16 -04:00
Michael Rash
41b137611f [test suite] validate multiple rules removed in a single check_firewall_rules() pass - validates f4f2ada1 2015-07-12 22:50:06 -04:00
Michael Rash
bb90a0cb2e [server] minor comment addition 2015-07-12 20:57:09 -04:00
Michael Rash
f4f2ada1c0 [server] bug fix to not zero the wrong buffer for iptables rule deletion
This commit fixes a bug where zero_cmd_buffers() was being called against the
wrong buffer as SPA rules were supposed to be deleted. Although multiple
iterations of check_firewall_rules() would have compensated, some rules would
not have been deleted as quickly as they should have in multi-rule scenarios.
2015-07-12 20:36:06 -04:00
Michael Rash
416023723f minor #define addition 2015-07-11 21:28:56 -04:00
Michael Rash
cd18570f71 [server] default to not returning partial line when collecting the output of an external command 2015-07-10 22:45:44 -04:00
Michael Rash
5460509f88 [server] add NAT rule existence detection for --no-ipt-check support (issue #162) 2015-07-07 08:28:16 -04:00
Michael Rash
4874dc9c83 [test suite] add --gpg-exe invalid path test 2015-07-05 22:55:23 -04:00
Michael Rash
012d1cf888 [server] interim commit towards a fix for --no-ipt-check rule detection
This is a significant commit for issue #162 where fwknopd is not properly
detecting rules (particularly NAT rules) on systems running older versions
of iptables where -C support is not offered. A new capability of searching
the output of an external command and getting the first matching line was
added with the search_extcmd_getline() function.
2015-07-05 20:47:06 -04:00
Michael Rash
5a58390ab4 [test suite] add dupe rule server output check 2015-07-04 17:12:49 -04:00
Michael Rash
86bcf243e6 [test suite] bug fix for iptables vs. firewalld 2015-07-04 17:03:08 -04:00
Michael Rash
4c7679fabd [server] start on sudo usage for command exec (issue #159) 2015-07-02 23:44:16 -04:00