BUG-4714 : No routes from loc-rib are advertised
[bgpcep.git] / bgp / rib-impl / src / main / java / org / opendaylight / protocol / bgp / rib / impl / RouterIds.java
index 47237d4ab7a8004d9ddd3703a80aea0729463dc4..bc6b3977984bb61b8699d957c6c3fc6c8c311337 100644 (file)
@@ -55,4 +55,9 @@ final class RouterIds {
     public static PeerId createPeerId(@Nonnull final Ipv4Address address) {
         return new PeerId(BGP_PREFIX + address.getValue());
     }
+
+    public static PeerId createPeerId(@Nonnull final UnsignedInteger intAddress) {
+        final String inet4Address = InetAddresses.fromInteger(intAddress.intValue()).getHostAddress();
+        return new PeerId(BGP_PREFIX.concat(inet4Address));
+    }
 }