Shashikanth VH
Committed by Gerrit Code Review

BGP support default IPV4 unicast capability.

Change-Id: Id9ad101e82a9148ddf029fdcf6404173a9574539
......@@ -292,6 +292,7 @@ public class BgpOpenMsgVer4 implements BgpOpenMsg {
private short asNumber;
private boolean isBgpIdSet = false;
private int bgpId;
private boolean isIpV4UnicastCapabilityTlvSet = true;
private boolean isLargeAsCapabilityTlvSet = false;
private boolean isLsCapabilityTlvSet = false;
private boolean isFlowSpecCapabilityTlvSet = false;
......@@ -312,6 +313,13 @@ public class BgpOpenMsgVer4 implements BgpOpenMsg {
throw new BgpParseException("BGPID is not set (mandatory)");
}
if (this.isIpV4UnicastCapabilityTlvSet) {
BgpValueType tlv;
tlv = new MultiProtocolExtnCapabilityTlv((short) Constants.AFI_IPV4_UNICAST, RES,
(byte) Constants.SAFI_IPV4_UNICAST);
this.capabilityTlv.add(tlv);
}
if (this.isLargeAsCapabilityTlvSet) {
BgpValueType tlv;
int value = this.asNumber;
......
......@@ -34,7 +34,8 @@ public final class Constants {
public static final short AFI_VALUE = 16388;
public static final byte VPN_SAFI_VALUE = (byte) 0x80;
public static final byte SAFI_VALUE = 71;
public static final short AFI_IPV4_UNICAST = 1;
public static final byte SAFI_IPV4_UNICAST = 1;
public static final short AFI_FLOWSPEC_VALUE = 1;
public static final byte SAFI_FLOWSPEC_VALUE = (byte) 133;
public static final byte VPN_SAFI_FLOWSPEC_VALUE = (byte) 134;
......