Throw ThreatAsWithdrawException on missing mandatory attributes 46/78646/7
authorMatej Perina <matej.perina@pantheon.tech>
Tue, 11 Dec 2018 12:33:16 +0000 (13:33 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Fri, 14 Dec 2018 00:43:58 +0000 (01:43 +0100)
commit47871f35bd3948ef88a0c143600510a8ecb0943c
treed0c8608c10e07d5cb0eee1bfed3e209f6272e6c2
parent661fc49686f1b5add51221cece2d036c7f0abf53
Throw ThreatAsWithdrawException on missing mandatory attributes

https://tools.ietf.org/html/rfc7606#section-3:
d.  If any of the well-known mandatory attributes are not present in
    an UPDATE message, then "treat-as-withdraw" MUST be used.

For this to work we need to update BGPTreatAsWithdrawException,
because RFC4271 requires us to report the attribute type.

JIRA: BGPCEP-359
Change-Id: I3f1a1d56a3cf1e7e1b84fe2f7a5933af95129b91
Signed-off-by: Matej Perina <matej.perina@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
bgp/parser-api/src/main/java/org/opendaylight/protocol/bgp/parser/AbstractBGPException.java [new file with mode: 0644]
bgp/parser-api/src/main/java/org/opendaylight/protocol/bgp/parser/BGPDocumentedException.java
bgp/parser-api/src/main/java/org/opendaylight/protocol/bgp/parser/BGPTreatAsWithdrawException.java
bgp/parser-impl/src/main/java/org/opendaylight/protocol/bgp/parser/impl/message/BGPUpdateMessageParser.java
bgp/parser-spi/src/main/java/org/opendaylight/protocol/bgp/parser/spi/RevisedErrorHandling.java