1
0
mirror of https://github.com/fwbuilder/fwbuilder synced 2026-03-18 17:27:20 +01:00

1275 Commits

Author SHA1 Message Date
Theron Tock
dc32508caf * Fixed #2505: make sure that objects that we show are members of
a dynamic group are actually objects.  Previously we were showing
	stuff like FirewallOptions objects.  To make sure that dynamic
	group expansion is done the same way in the UI and for the
	compiler, also fixed #2502 (consolidate logic for DynamicGroup).
2011-07-13 12:09:36 -07:00
Theron Tock
c1216252c4 Merge branch 'development' of ssh://ncgit/var/git/fwbuilder into development
Conflicts:
	doc/ChangeLog
	src/pflib/CompilerDriver_pf_run.cpp
	src/pflib/TableFactory.cpp
	src/pflib/TableFactory.h
2011-07-11 21:52:31 -07:00
Theron Tock
4c4b67b5bd * Implemented #2514, support for address table alternate paths.
There's a "data directory" setting under user preferences.  If the
	user selects an address table file using "choose file" and that
	file is "inside" the data directory, then the appropriate part of
	the path is replaced with %DATADIR% as a variable.  If the address
	table is marked "run-time" then the path is taken from the
	firewall data directory option.
2011-07-11 21:33:13 -07:00
Vadim Kurland
0790bb8509 see #2513 "Group and Address Table name persistence in generated
config". Compiler for PF can now preserve names of object groups,
dynamic groups, compile-time AddressTable and compile-time DNSName
objects in the generated pf.conf file. This is optional and is
controlled by a checkbox in the firewall settings dialog.
2011-07-11 18:43:29 -07:00
Vadim Kurland
b850545eab see #2551 Importer should parse PF rules that use "route-to",
"reply-to" and "dup-to" options in both pre-4.7 and 4.7 formats. In PF
4.7 these parameters moved to the end of the rule and are now part of
the "filteropts" block of parameters.
2011-07-09 21:41:04 -07:00
Vadim Kurland
8a8e9577fb see #2551 Importer should correctly import "pool type" parameter that
follows source routing rule options "route-to", "reply-to" and
"dup-to". Also, since currently fwbuilder does not support source
routing rules with multiple different interface-gateway pairs (only
one interface in combination with one or multiple gateway addresses
are supported), importer displays warning and marks rules as "broken"
when it encounters this configuration.
2011-07-09 21:30:54 -07:00
Vadim Kurland
bbf03ad49c see #2561 operation of making an interface a subinterface should be
performed using undo/redo command. Also, this should take care of
inconvenient scrolling of the object tree after this operation.
2011-07-09 16:42:37 -07:00
Vadim Kurland
7e2cdbb030 see #2562 "Crash when making an interface that has subinterfaces a
subinterface of another interfrace". If an interface has
subinterfaces, it should not be allowed to become subinterface of
another interface.
2011-07-09 14:33:00 -07:00
Vadim Kurland
8158519a06 see #2561 "Add context menu to move an interface to be a child of
another interface". New context menu (submenu) allows user to move an
interface in the tree to make it a subinterface of another interface.
2011-07-08 17:33:30 -07:00
Vadim Kurland
57873de18d see #2556 "PF import: impor of rules referring to undefined
macros". Importer now records all parser errors in the comments of
rules where they occurred and marks these rules "broken" by coloring
them red. Behavior on import of pf.conf file with undefined macros is
inconsistent at this time: undefined macro that appears in a rule
where parser expects ip addresses is converted to a run-time DNSName
object with name "$macro", a warning is displayed and rule is marked
as "broken". Undefined macro in the position of interface name, port
name or other parameters triggers generic parser error that looks like
"Parser error: line 26:19: unexpected token: $ext". The rule is marked
as "broken" and the error is recorded in the comment.
2011-07-08 12:18:39 -07:00
Vadim Kurland
ea03c38e99 see #2556 "PF import:
impor of rules referring to undefined macros". Importer displays
warnings for all undefined macros found in the file, even if there
are several.
2011-07-08 11:45:42 -07:00
Vadim Kurland
a440400b9e fixes #2559 "Crash on import when at least one DynamicGroup object
already exists in the object tree."
2011-07-08 11:27:40 -07:00
Vadim Kurland
98593d3843 see #2191 "Crash when compiling a route with table object". Compiler
for PF crashed when run-time AddressTable object was used in RDst of a
routing rule.
2011-07-07 18:58:46 -07:00
Vadim Kurland
0d69945d2f see #2546 "PF import - negation inside of inline tables is
ignored". Since we can not import address lists or tables that contain
a mix of negated and non-negated items, importer should display an
error when it enounters one of these and mark all rules that use it as
"broken" (rule is colored red and error message is added to the
comment).
2011-07-07 18:04:24 -07:00
Vadim Kurland
56ee41fdee see #2556 "PF import: impor of rules referring to undefined
macros". If pf.conf file uses an undefined macro (there is $macro
somewhere but the macro has never been defined), importer issues a
warning, creates run-time DNSName object with the name "$macro" and
marks all rules where it is used as broken, that is, rules are colored
red and the error message is added to the comment field. Using
run-time DNSName object makes compiler use "$macro" in the generated
pf rule which means fwbuilder generates exactly the same pf rule as
the one it tried to import.
2011-07-07 17:24:57 -07:00
Vadim Kurland
d850139f2d see #2554 "PF import: create groups of address objects for macros
where possible". Importer for PF recognizes macros that define lists
of ip addresses, interfaces or host names and creates object groups
with the same name from them.  Only macros that contain at least one
ip address in the list are recognized.
2011-07-07 16:17:27 -07:00
Vadim Kurland
fff5775c39 new build 3558 2011-07-07 11:31:09 -07:00
Vadim Kurland
e0be917ef2 * applied two patches by Vadim Zhukov persgray@gmail.com to
replace calls to sprintf with safer calls to snprintf and fix some
compiler warnings.
2011-07-06 16:43:38 -07:00
Vadim Kurland
6046524a37 see #2552 "PF import: add ability to suppress comments referring to
line numbers in the original file".
2011-07-06 16:13:59 -07:00
Vadim Kurland
fd63078a5e see #2551 "PF Import - source routing rules are not imported with rule
options set". Importer should import "route-to" rule parameters.
2011-07-06 14:36:47 -07:00
Vadim Kurland
2914c7f81a * PFImporter.cpp (newAddressTableObject): see #2546 "PF import -
negation inside of inline tables is ignored". We can not import
PF table definition that has some addresses negated.
2011-07-06 12:45:16 -07:00
Vadim Kurland
f45f9ccb4b * PFImporterRun.cpp (run): see #2550 "PF import - recursive macros
are not supported". Importer for PF should interpret macro
definitions that use other macros. See #2545 "PF import error when
using macro names with same base name and incrementing digit
suffix". Importer should correctly interpret a macro that has name
of another macro as a substring of its own name.
2011-07-06 12:14:06 -07:00
Vadim Kurland
531c5a83fe PolicyCompiler_pf_writers.cpp (processNext): see #2549 "Update
generated route-to configuration for PF versions 4.7 and later",
SF bug 3348931. The "route-to" parameter moved to the end of
pass rules in PF 4.7
2011-07-05 14:00:35 -07:00
Vadim Kurland
eb67ae82ff * pf.g: fixed bug in PF import: address lists such as "{ addr1,
addr2, ... }" defined as macros or inside the rule could not be
imported correctly.

* pf.g: we should be able to import both "block quick log" and
"block log quick".
2011-07-05 13:27:14 -07:00
Theron Tock
05e9a1e215 Made keyword add/remove buttons the same size.
Fixes #2547.
2011-06-30 11:35:40 -07:00
Theron Tock
d7ee7ebabb Adding new icons for dynamic groups.
Fixes #2544 partially.
2011-06-29 15:03:58 -07:00
Theron Tock
cad71437f3 Make sure user folders are added properly. Also deal with case of an
object that has a folder attribute that doesn't exist in the parent's
subfolders list (shouldn't ever happen, but in case it does it no longer
crashes).  Also make sure that subfolders don't have commas in them.

Fixes #2539.
2011-06-29 14:50:07 -07:00
Theron Tock
2ee4869fac Catch exception inside preprocessor loop so that loop continues after
error (for unit tests).  Also make sure to set ".loaded" variable before
calling loadFromSource so that if an exception happens we won't try to
load it again later.

Fixes #2542.
2011-06-29 14:28:33 -07:00
Theron Tock
57de77b341 On mac we can get a drop event even if dragMoveEvent() says the drop is
invalid.  So we validate the drop the same we validate in dragMove to
make sure we don't crash on an invalid drop.

Fixes #2540.
2011-06-29 12:58:55 -07:00
Theron Tock
872fd64cb6 Various places in the code had logic for what directory to display in
QFileDialog.  There is now a single function to call,
FWBSettings::getOpenFileDir() that will compute what directory to start
in.

Cleaned out some code using QFileDialog that is never used (execDialog
and file button in CommentEditor).

Fixes #2517
2011-06-27 16:51:21 -07:00
Theron Tock
69364a4ee9 Display little folder icon next to "add subfolder". I don't see these
icons on linux so hopefully this comes out looking right.  :-)

Fixes #2528.
2011-06-27 14:48:03 -07:00
Theron Tock
a82219e002 Recent changes. 2011-06-27 14:34:14 -07:00
Vadim Kurland
ae21e6228f see #2520 "Attached Network objects are not renamed if a firewall is
renamed"
2011-06-22 15:35:52 -07:00
Vadim Kurland
d7a749154f see #2519 Avoid creating duplicate network objects for the
AttachedNetwork object if the parent interface has multiple ip
addresses that belong to the same subnet.
2011-06-22 15:25:18 -07:00
Vadim Kurland
c940bed072 see #2521 "Compile fails if firewall has locked interface that is set
to dynamic".
2011-06-22 14:55:53 -07:00
Vadim Kurland
344a22feed see #2524 'avoid " {tcp udp icmp} " in place of protocol'. NAT
compiler for PF does not need to generate protocol match "proto {tcp
udp icmp}" when service object used in the NAT rule is "any". The
reason this was done this way is lost in the mist of time; it's been
like this since very early versions of fwbuilder.
2011-06-22 11:03:07 -07:00
Vadim Kurland
49eed4d5be fixes #2428 and SF bug 3305234; new build 3551 2011-06-21 12:49:17 -07:00
Vadim Kurland
b8abb51339 see #2493 implemented "forward" function in addition to the "back"
function, added a button to the roolbar, using new icons for Back and
Forward buttons.
2011-06-20 16:30:53 -07:00
Vadim Kurland
f5e22c040b see #2477 removed transfer agent classes and functions 2011-06-20 14:56:28 -07:00
Vadim Kurland
db233ee8e8 see #2506 removed incomplete and obsolete russian and japanese localization 2011-06-20 11:35:22 -07:00
Vadim Kurland
d4a8546b6b incremented DTD version to 22 necause changes made for keywords and DynamicGroup object are not backwards-compatible; removed contributed autoupgrade xslt script that is not being used anymore, see #2501 2011-06-10 15:26:06 -07:00
Vadim Kurland
d682785b63 see #2496 parsing, but not importing, "user" and "group" matches 2011-06-09 16:33:22 -07:00
Vadim Kurland
c77796ebd0 see #2497 added an error on import of "include" word in pf.conf files 2011-06-09 16:15:36 -07:00
Vadim Kurland
677173e030 see #2487 fixed crash that happened when user created new cluster from member firewalls that had locked interfaces
;
2011-06-09 14:01:17 -07:00
Vadim Kurland
8d80e04420 FWWindow_editor.cpp (openEditor): this change is a part of the
GUI usability improvements: when user double clicks on a firewall
object to open it in the editor, rule set view panel switches to
the rule set of that firewall. To decide which rule set to show,
the program scans history of the objects the user opened before in
the same GUI session and shows that firewall's rule set they
opened last. If user never opened any rule sets of this firewall,
then the first Policy object is shown. See #2465.
2011-06-04 17:04:29 -07:00
Vadim Kurland
5888835db7 see #2454 making "any" open in the editor upon double-click; added ChangeLog record 2011-06-04 16:16:48 -07:00
Vadim Kurland
6d6038370c * applied patch to provide configure command line option to specify
path to ccache. Thanks to user "a. k. huettel " on SourceForge.
2011-06-03 20:39:38 -07:00
Vadim Kurland
6a9fdbf3af NATCompiler_pf.cpp (_expand_addr): see #2455 NAT Compiler for PF
should use "(interface)" syntax to the right of "->" in NAT rules.
This now works for all interfaces, including those that have ip
addresses in fwbuilder configuration, when interface object appears in
"Translated Source" in a nat rule. When firewall object appears in
"Translated Source", it gets replaced with a set of its interfaces
which also get translated into "-> (interface)".
2011-06-03 18:59:44 -07:00
Vadim Kurland
15bab71f49 * NATCompiler_ipt.cpp (compile): see #2456 Added support for
single object negation in "Inbound Interface" and "Outbound
Interface" columns in compiler for iptables.

* NATCompiler_pf.cpp (compile): see #2456 Added support for single
object negation in "Interface" rule element of PF NAT rules. Now
compiler can produce PF commands such as "nat on ! em0 ... " (for
PF <4.7) or "match on ! em0 ..." (for PF >= 4.7)

* Compiler.cpp (singleObjectNegation::processNext): moved rule
processor that processes single object negation in any rule
element to the base class Compiler.
2011-06-03 17:54:14 -07:00
Vadim Kurland
a0da65ddc9 see #2464 implemented import of PF "set timeout",
"set limit" and other "set" commands. Known limitations:

 - commands "set ruleset-optimization", "set loginterface",
   "set block-policy", "set state-defaults", "set require-order",
   "set fingerprints", "set reassemble", "set hostid" are not supported.
2011-06-02 17:18:37 -07:00