Repository :
http://git.fedorahosted.org/cgit/firewalld-recode.git
On branch : master
---------------------------------------------------------------
commit cf69521b388160f3014a88698da2cce5fdda77cb
Author: Daniel Kopecek <dkopecek(a)redhat.com>
Date: Wed Nov 26 13:58:53 2014 +0100
Don't try to be smart in Zone::addPort, throw an exception for an invalid
protocol
---------------------------------------------------------------
src/Daemon/Firewall/Zone.cpp | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
diff --git a/src/Daemon/Firewall/Zone.cpp b/src/Daemon/Firewall/Zone.cpp
index 2b61bb2..a7d3bdf 100644
--- a/src/Daemon/Firewall/Zone.cpp
+++ b/src/Daemon/Firewall/Zone.cpp
@@ -238,12 +238,8 @@ namespace firewalld
case Port::Protocol::UDP:
_udp_port_map[port->range()] = port;
break;
- case Port::Protocol::AnyProtocol:
- _tcp_port_map[port->range()] = port;
- _udp_port_map[port->range()] = port;
- break;
default:
- ; // throw an exception
+ throw FirewallError("INVALID_PORT", "Zone::addPort: invalid port
protocol");
}
}