Shashikanth VH
Committed by Gerrit Code Review

BGP notification system test issues fix

Change-Id: I53b1aca6cf361fa212dd5ab83380bef40bbc5cd7
......@@ -194,7 +194,9 @@ class BgpNotificationMsgVer4 implements BgpNotificationMsg {
}
cb.writeByte(message.errorCode);
cb.writeByte(message.errorSubCode);
if (message.data != null) {
cb.writeBytes(message.data);
}
//Update message length field in notification message
int length = cb.writerIndex() - msgStartIndex;
......
......@@ -166,6 +166,11 @@ public class BgpPathAttributes {
public static void checkMandatoryAttr(boolean isOrigin, boolean isAsPath,
boolean isNextHop, boolean isMpReach, boolean isMpUnReach)
throws BgpParseException {
// Mandatory attributes validation not required for MP_UNREACH
if (isMpUnReach) {
return;
}
if (!isOrigin) {
log.debug("Mandatory Attributes not Present");
Validation.validateType(BgpErrorType.UPDATE_MESSAGE_ERROR,
......