Skip to content

Commit

Permalink
Set error code/subcode for MP_REACH_NLRI nexthop address length
Browse files Browse the repository at this point in the history
Change-Id: I936c7d5647201eab392d45789f1c468a32abaa67
Closes-Bug: 1517210
  • Loading branch information
Nischal Sheth committed Nov 21, 2015
1 parent 69596de commit fa8aae5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/bgp/bgp_proto.cc
Expand Up @@ -1148,10 +1148,13 @@ class BgpPathAttributeMpNlriNextHopLength :
public ProtoElement<BgpPathAttributeMpNlriNextHopLength> {
public:
static const int kSize = 1;
static const int kErrorCode = BgpProto::Notification::UpdateMsgErr;
static const int kErrorSubcode =
BgpProto::Notification::OptionalAttribError;
typedef int SequenceLength;
static bool Verifier(const BgpMpNlri *obj, const uint8_t *data, size_t size,
ParseContext *context) {
uint8_t len = data[0];
uint8_t len = get_value(data, kSize);
uint16_t afi = obj->afi;
uint8_t safi = obj->safi;
if (afi == BgpAf::IPv4 && safi == BgpAf::Unicast) {
Expand Down

0 comments on commit fa8aae5

Please sign in to comment.