]> git.proxmox.com Git - mirror_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 21:07:56 +0000 (23:07 +0200)
commitb1d7888f9b58cf129c6d9a3317035a81b86b829c
treeaac229918b50aef92c52d4feca9d97af0c4fc505
parent7461589c2e41dd33306b1d5cd23689094ac66cd7
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