kimjt

fix to apply TCP/UDP port rule of Security Group

Change-Id: I1e1db236c1a1da939c6e6205b72de3eba45964a7
...@@ -228,15 +228,15 @@ public class OpenstackSecurityGroupManager extends AbstractVmHandler ...@@ -228,15 +228,15 @@ public class OpenstackSecurityGroupManager extends AbstractVmHandler
228 if (portMin > 0 && portMax > 0 && portMin == portMax) { 228 if (portMin > 0 && portMax > 0 && portMin == portMax) {
229 if (protocol.toUpperCase().equals(PROTO_TCP)) { 229 if (protocol.toUpperCase().equals(PROTO_TCP)) {
230 if (direction.equals(OpenstackSecurityGroupRule.Direction.EGRESS)) { 230 if (direction.equals(OpenstackSecurityGroupRule.Direction.EGRESS)) {
231 - sBuilder.matchTcpDst(TpPort.tpPort(portMax));
232 - } else {
233 sBuilder.matchTcpSrc(TpPort.tpPort(portMax)); 231 sBuilder.matchTcpSrc(TpPort.tpPort(portMax));
232 + } else {
233 + sBuilder.matchTcpDst(TpPort.tpPort(portMax));
234 } 234 }
235 } else if (protocol.toUpperCase().equals(PROTO_UDP)) { 235 } else if (protocol.toUpperCase().equals(PROTO_UDP)) {
236 if (direction.equals(OpenstackSecurityGroupRule.Direction.EGRESS)) { 236 if (direction.equals(OpenstackSecurityGroupRule.Direction.EGRESS)) {
237 - sBuilder.matchUdpDst(TpPort.tpPort(portMax));
238 - } else {
239 sBuilder.matchUdpSrc(TpPort.tpPort(portMax)); 237 sBuilder.matchUdpSrc(TpPort.tpPort(portMax));
238 + } else {
239 + sBuilder.matchUdpDst(TpPort.tpPort(portMax));
240 } 240 }
241 } 241 }
242 } 242 }
......