]> git.puffer.fish Git - matthieu/frr.git/commit
bgpd: Set attr to NULL when passing NLRI_UPDATE with treat-as-withdraw
authorDonatas Abraitis <donatas@opensourcerouting.org>
Tue, 24 Jan 2023 08:32:13 +0000 (10:32 +0200)
committerDonatas Abraitis <donatas@opensourcerouting.org>
Wed, 1 Feb 2023 20:57:34 +0000 (22:57 +0200)
commitf92d1b2647bfb5937f1e5f131350a300f1224136
tree0d56cfddeaacb077f7360e2c4d4de2d7eaa861cb
parent599d1200b318806eae71ac6e32ecf75cd1168298
bgpd: Set attr to NULL when passing NLRI_UPDATE with treat-as-withdraw

Before this patch, we always passed `struct attr` for NLRI_UPDATE, but if we
have a situation with treat-as-withdraw (for example: malformed attribute, or
using a command like `neighbor path-attribute treat-as-withdraw`) the route
MUST be withdrawn form the BGP table.

Hence, we MUST pass attr as NULL, in this case we already have this check
under NLRI_ATTR_ARG() macro, just reuse it properly.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
bgpd/bgp_packet.c