diff options
| author | Louis Scalbert <louis.scalbert@6wind.com> | 2023-02-02 15:44:31 +0100 |
|---|---|---|
| committer | Louis Scalbert <louis.scalbert@6wind.com> | 2023-02-02 16:20:01 +0100 |
| commit | 81e7bb3dbd791898e5a37891c7d675e1b9f4ab44 (patch) | |
| tree | d86e6da08db37025d22a5863da52acd8b78844a5 /lib/command_py.c | |
| parent | 7d1cbd75e147e3958dc197e7e40b7b50ce597276 (diff) | |
lib: fix traffic engineering extended mask
RFC7471 and RFC8570 have defined the Extended Traffic Engineering
metrics that are carried within TLV of 32 bits data length. Extended
metrics, excepting bandwidth ones, use the following format:
> 0 1 2 3
> 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
> | Type | Length |
> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
> |A| RESERVED | Value |
> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Data contains a flag/reserved of 8 bits and a 24 bits value.
The TE_EXT_MASK mask macro extracts a 28 bits value from a 32 bits
variable instead of 24 bits. It works in most of the case because
RESERVED bits are generally set to 0.
Fix the TE_EXT_MASK mask.
Fixes: 16f1b9ee29 ("Update Traffic Engineering Support for OSPFD")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Diffstat (limited to 'lib/command_py.c')
0 files changed, 0 insertions, 0 deletions
