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

Fix bug in ActionUtils. OF1.0 transport ports were being parsed as shorts. For...

Fix bug in ActionUtils. OF1.0 transport ports were being parsed as shorts. For ports above 32767, this is bad.
parent 651677cf
No related branches found
No related tags found
No related merge requests found
......@@ -1179,7 +1179,7 @@ public class ActionUtils {
if (n.matches()) {
if (n.group(1) != null) {
try {
TransportPort portnum = TransportPort.of(get_short(n.group(1)));
TransportPort portnum = TransportPort.of(get_int(n.group(1)));
OFActionSetTpSrc.Builder ab = OFFactories.getFactory(version).actions().buildSetTpSrc();
ab.setTpPort(portnum);
log.debug("action {}", ab.build());
......@@ -1213,7 +1213,7 @@ public class ActionUtils {
if (n.matches()) {
if (n.group(1) != null) {
try {
TransportPort portnum = TransportPort.of(get_short(n.group(1)));
TransportPort portnum = TransportPort.of(get_int(n.group(1)));
OFActionSetTpDst.Builder ab = OFFactories.getFactory(version).actions().buildSetTpDst();
ab.setTpPort(portnum);
log.debug("action {}", ab.build());
......
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