Skip to content
Snippets Groups Projects
Commit 9ff45153 authored by Ryan Izard's avatar Ryan Izard
Browse files

Merge pull request #601 from chechoRP/patch-1

Fix for Firewall issue #590
parents 7fbbbbbb e183e76e
No related branches found
No related tags found
No related merge requests found
......@@ -223,8 +223,10 @@ public class FirewallRulesResource extends ServerResource {
else if (n.equalsIgnoreCase("src-ip")) {
if (!jp.getText().equalsIgnoreCase("ANY")) {
rule.any_nw_src = false;
rule.any_dl_type = false;
rule.dl_type = EthType.IPv4;
if (rule.dl_type.equals(EthType.NONE)){
rule.any_dl_type = false;
rule.dl_type = EthType.IPv4;
}
try {
rule.nw_src_prefix_and_mask = IPv4AddressWithMask.of(jp.getText());
} catch (IllegalArgumentException e) {
......@@ -237,8 +239,10 @@ public class FirewallRulesResource extends ServerResource {
else if (n.equalsIgnoreCase("dst-ip")) {
if (!jp.getText().equalsIgnoreCase("ANY")) {
rule.any_nw_dst = false;
rule.any_dl_type = false;
rule.dl_type = EthType.IPv4;
if (rule.dl_type.equals(EthType.NONE)){
rule.any_dl_type = false;
rule.dl_type = EthType.IPv4;
}
try {
rule.nw_dst_prefix_and_mask = IPv4AddressWithMask.of(jp.getText());
} catch (IllegalArgumentException e) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment