Pavlin Radoslavov

Removed extra IpAddress.toInt() calls, which are not needed.

Change-Id: Ic295d0e4ca963b15eb4ebf905d6360e457832c8f
......@@ -147,9 +147,9 @@ public class PeerConnectivityManager {
TrafficSelector selector = DefaultTrafficSelector.builder()
.matchEthType(Ethernet.TYPE_IPV4)
.matchIPProtocol(IPv4.PROTOCOL_TCP)
.matchIPSrc(IpPrefix.valueOf(bgpdAddress.toInt(),
.matchIPSrc(IpPrefix.valueOf(bgpdAddress,
IpPrefix.MAX_INET_MASK_LENGTH))
.matchIPDst(IpPrefix.valueOf(bgpdPeerAddress.toInt(),
.matchIPDst(IpPrefix.valueOf(bgpdPeerAddress,
IpPrefix.MAX_INET_MASK_LENGTH))
.matchTcpDst((short) BgpConstants.BGP_PORT)
.build();
......@@ -170,9 +170,9 @@ public class PeerConnectivityManager {
selector = DefaultTrafficSelector.builder()
.matchEthType(Ethernet.TYPE_IPV4)
.matchIPProtocol(IPv4.PROTOCOL_TCP)
.matchIPSrc(IpPrefix.valueOf(bgpdAddress.toInt(),
.matchIPSrc(IpPrefix.valueOf(bgpdAddress,
IpPrefix.MAX_INET_MASK_LENGTH))
.matchIPDst(IpPrefix.valueOf(bgpdPeerAddress.toInt(),
.matchIPDst(IpPrefix.valueOf(bgpdPeerAddress,
IpPrefix.MAX_INET_MASK_LENGTH))
.matchTcpSrc((short) BgpConstants.BGP_PORT)
.build();
......@@ -190,9 +190,9 @@ public class PeerConnectivityManager {
selector = DefaultTrafficSelector.builder()
.matchEthType(Ethernet.TYPE_IPV4)
.matchIPProtocol(IPv4.PROTOCOL_TCP)
.matchIPSrc(IpPrefix.valueOf(bgpdPeerAddress.toInt(),
.matchIPSrc(IpPrefix.valueOf(bgpdPeerAddress,
IpPrefix.MAX_INET_MASK_LENGTH))
.matchIPDst(IpPrefix.valueOf(bgpdAddress.toInt(),
.matchIPDst(IpPrefix.valueOf(bgpdAddress,
IpPrefix.MAX_INET_MASK_LENGTH))
.matchTcpDst((short) BgpConstants.BGP_PORT)
.build();
......@@ -210,9 +210,9 @@ public class PeerConnectivityManager {
selector = DefaultTrafficSelector.builder()
.matchEthType(Ethernet.TYPE_IPV4)
.matchIPProtocol(IPv4.PROTOCOL_TCP)
.matchIPSrc(IpPrefix.valueOf(bgpdPeerAddress.toInt(),
.matchIPSrc(IpPrefix.valueOf(bgpdPeerAddress,
IpPrefix.MAX_INET_MASK_LENGTH))
.matchIPDst(IpPrefix.valueOf(bgpdAddress.toInt(),
.matchIPDst(IpPrefix.valueOf(bgpdAddress,
IpPrefix.MAX_INET_MASK_LENGTH))
.matchTcpSrc((short) BgpConstants.BGP_PORT)
.build();
......@@ -280,9 +280,9 @@ public class PeerConnectivityManager {
TrafficSelector selector = DefaultTrafficSelector.builder()
.matchEthType(Ethernet.TYPE_IPV4)
.matchIPProtocol(IPv4.PROTOCOL_ICMP)
.matchIPSrc(IpPrefix.valueOf(bgpdAddress.toInt(),
.matchIPSrc(IpPrefix.valueOf(bgpdAddress,
IpPrefix.MAX_INET_MASK_LENGTH))
.matchIPDst(IpPrefix.valueOf(bgpdPeerAddress.toInt(),
.matchIPDst(IpPrefix.valueOf(bgpdPeerAddress,
IpPrefix.MAX_INET_MASK_LENGTH))
.build();
......@@ -300,9 +300,9 @@ public class PeerConnectivityManager {
selector = DefaultTrafficSelector.builder()
.matchEthType(Ethernet.TYPE_IPV4)
.matchIPProtocol(IPv4.PROTOCOL_ICMP)
.matchIPSrc(IpPrefix.valueOf(bgpdPeerAddress.toInt(),
.matchIPSrc(IpPrefix.valueOf(bgpdPeerAddress,
IpPrefix.MAX_INET_MASK_LENGTH))
.matchIPDst(IpPrefix.valueOf(bgpdAddress.toInt(),
.matchIPDst(IpPrefix.valueOf(bgpdAddress,
IpPrefix.MAX_INET_MASK_LENGTH))
.build();
......
......@@ -1241,8 +1241,8 @@ public class BgpSession extends SimpleChannelHandler {
}
address <<= extraShift;
IpPrefix prefix =
IpPrefix.valueOf(IpAddress.valueOf((int) address).toInt(),
(short) prefixBitlen);
IpPrefix.valueOf(IpAddress.valueOf((int) address),
prefixBitlen);
result.add(prefix);
}
......