summaryrefslogtreecommitdiff
path: root/lib/command_py.c
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas@opensourcerouting.org>2023-08-16 11:14:39 +0300
committerDonatas Abraitis <donatas@opensourcerouting.org>2023-08-16 11:14:39 +0300
commitf023a2e03f4a8924b3b5ef0136e291549a4b814c (patch)
tree4c365f59724042f2473d4240044813f57be5d33f /lib/command_py.c
parent515585ae9f3cdce60cbd1caa6c9a05095cde796e (diff)
bgpd: Treat-as-withdraw attribute if remaining data is not enough
Relax this handling (RFC 7606) only for eBGP peers. More details: https://datatracker.ietf.org/doc/html/rfc7606#section-4 There are two error cases in which the Total Attribute Length value can be in conflict with the enclosed path attributes, which themselves carry length values: * In the first case, the length of the last encountered path attribute would cause the Total Attribute Length to be exceeded when parsing the enclosed path attributes. * In the second case, fewer than three octets remain (or fewer than four octets, if the Attribute Flags field has the Extended Length bit set) when beginning to parse the attribute. That is, this case exists if there remains unconsumed data in the path attributes but yet insufficient data to encode a single minimum- sized path attribute. <<<< HANDLING THIS CASE IN THIS COMMIT >>>> In either of these cases, an error condition exists and the "treat- as-withdraw" approach MUST be used (unless some other, more severe error is encountered dictating a stronger approach), and the Total Attribute Length MUST be relied upon to enable the beginning of the NLRI field to be located. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Diffstat (limited to 'lib/command_py.c')
0 files changed, 0 insertions, 0 deletions