Skip to content
Snippets Groups Projects
Commit 00d965d6 authored by Ryan Izard's avatar Ryan Izard Committed by GitHub
Browse files

Merge pull request #672 from rizard/openflow15

fix bug in ACL. UDP is decimal 17, not 11 (is 0x11)
parents c0b98196 aa580d39
No related branches found
No related tags found
No related merge requests found
......@@ -185,7 +185,7 @@ public class ACLRuleResource extends ServerResource {
if ("TCP".equalsIgnoreCase(value)) {
rule.setNw_proto(6);
} else if ("UDP".equalsIgnoreCase(value)) {
rule.setNw_proto(11);
rule.setNw_proto(17);
} else if ("ICMP".equalsIgnoreCase(value)) {
rule.setNw_proto(1);
} else {
......@@ -195,7 +195,7 @@ public class ACLRuleResource extends ServerResource {
else if ("tp-dst".equals(key)) {
// only when tp-dst == (TCP || UDP), tp-dst can have non-0 value
if(rule.getNw_proto() == 6 || rule.getNw_proto() == 11){
if(rule.getNw_proto() == 6 || rule.getNw_proto() == 17){
try{
rule.setTp_dst(Integer.parseInt(value));
}catch(NumberFormatException 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