struct attr *const attr = args->attr;
const bgp_size_t length = args->length;
+ /* if the ORIGINATOR_ID attribute is received from an external
+ * neighbor, it SHALL be discarded using the approach of "attribute
+ * discard".
+ */
+ if (peer->sort == BGP_PEER_EBGP) {
+ stream_forward_getp(peer->curr, length);
+ return BGP_ATTR_PARSE_PROCEED;
+ }
+
/* if received from an internal neighbor, it SHALL be considered
* malformed if its length is not equal to 4. If malformed, the
* UPDATE message SHALL be handled using the approach of "treat-as-
"paths": [
{
"valid": True,
- "originatorId": "10.0.0.2",
+ "originatorId": None,
"community": {
"string": "65001:102",
},
_, result = topotest.run_and_expect(test_func, None, count=30, wait=0.5)
assert result is None, "Failed bgp convergence"
- step("Discard atomic-aggregate, community, and originator-id attributes from peer1")
+ step("Discard atomic-aggregate, and community attributes from peer1")
r1.vtysh_cmd(
"""
configure terminal
router bgp
- neighbor 10.0.0.2 path-attribute discard 6 8 9
+ neighbor 10.0.0.2 path-attribute discard 6 8
"""
)
_, result = topotest.run_and_expect(test_func, None, count=30, wait=0.5)
assert (
result is None
- ), "Failed to discard path attributes (atomic-aggregate, community, and originator-id)"
+ ), "Failed to discard path attributes (atomic-aggregate, community)"
def test_memory_leak():