mirror of
https://github.com/fwbuilder/fwbuilder
synced 2026-09-14 17:09:11 +02:00
fixed bug 2712514
This commit is contained in:
@@ -1,3 +1,15 @@
|
||||
2009-03-25 vadim <vadim@vk.crocodile.org>
|
||||
|
||||
* NATCompiler_pf_writers.cpp (PrintRule::_printPort): fixed bug
|
||||
#2712514: "Bug in PF NAT Writer - 'tagged' keyword". Keyword
|
||||
'tagged' is only allowed on the left hand side of '->' in nat
|
||||
and rdr rules.
|
||||
|
||||
* RuleElement.cpp (RuleElementTSrv::validateChild): (change in
|
||||
libfwbuilder) fixed bug #2712575: "NAT RuleSetView allows
|
||||
TagService to be in Translated Svc". TagService object should not
|
||||
be allowed in "Translated Service" in NAT rules.
|
||||
|
||||
2009-03-24 vadim <vadim@vk.crocodile.org>
|
||||
|
||||
* DialogData.cpp (DialogData::loadToWidget): fixed bug #2710309:
|
||||
|
||||
@@ -343,7 +343,8 @@ namespace fwcompiler {
|
||||
std::string current_rule_label;
|
||||
|
||||
virtual void _printProtocol(libfwbuilder::Service *srv);
|
||||
virtual void _printPort(libfwbuilder::Service *srv,bool print_range_end);
|
||||
virtual void _printPort(libfwbuilder::Service *srv,
|
||||
bool lhs);
|
||||
|
||||
virtual void _printAddrList(libfwbuilder::FWObject *o,bool negflag);
|
||||
virtual void _printREAddr(libfwbuilder::RuleElement *o);
|
||||
|
||||
@@ -249,7 +249,16 @@ void NATCompiler_pf::PrintRule::_printProtocol(Service *srv)
|
||||
}
|
||||
}
|
||||
|
||||
void NATCompiler_pf::PrintRule::_printPort(Service *srv, bool print_range_end)
|
||||
/*
|
||||
* print port numbers for the service. For most platforms that inherit
|
||||
* classes for PF this is sufficient, but PF itself also supports
|
||||
* TagService and this method prints "tagged" keyword for it as well.
|
||||
* Arg <lhs> controls which side of the "->" this service is on. On
|
||||
* the right hand side PF supports shortcut spec 'NNNN:*', but it is
|
||||
* not allowed on the left hand side. Also keyword "tagged" is only
|
||||
* allowed on the left hand side of "->".
|
||||
*/
|
||||
void NATCompiler_pf::PrintRule::_printPort(Service *srv, bool lhs)
|
||||
{
|
||||
if (TCPService::isA(srv) || UDPService::isA(srv))
|
||||
{
|
||||
@@ -260,7 +269,7 @@ void NATCompiler_pf::PrintRule::_printPort(Service *srv, bool print_range_end)
|
||||
compiler->output << "port " << drs;
|
||||
if (dre!=0 && dre!=drs)
|
||||
{
|
||||
if (print_range_end)
|
||||
if (lhs)
|
||||
compiler->output << ":" << dre;
|
||||
else
|
||||
compiler->output << ":*";
|
||||
@@ -268,7 +277,8 @@ void NATCompiler_pf::PrintRule::_printPort(Service *srv, bool print_range_end)
|
||||
}
|
||||
compiler->output << " ";
|
||||
}
|
||||
if (TagService::isA(srv))
|
||||
|
||||
if (lhs && TagService::isA(srv))
|
||||
{
|
||||
compiler->output << "tagged "
|
||||
<< TagService::constcast(srv)->getCode() << " ";
|
||||
|
||||
Reference in New Issue
Block a user