diff options
author | Olivier Dugeon <olivier.dugeon@orange.com> | 2021-02-26 16:30:11 +0100 |
---|---|---|
committer | Olivier Dugeon <olivier.dugeon@orange.com> | 2021-03-23 15:39:29 +0100 |
commit | 2efd7e2bdc4b60b51e8d9fe10b0bb20355c373fa (patch) | |
tree | 5a9182223e2ae6c30526a4668fc6ce1128027b09 /ospfd/ospf_te.h | |
parent | opsfd: Correct MPLS-TE bug with LSA Flush (diff) | |
download | frr-2efd7e2bdc4b60b51e8d9fe10b0bb20355c373fa.tar.xz frr-2efd7e2bdc4b60b51e8d9fe10b0bb20355c373fa.zip |
ospfd: Correct Opaque Inter-AS LSA management
This patch corrects two problems that affect Inter-AS LSA:
1/ Inter-LSA are never flood due to an incorrect setting of specific flag.
2/ When looking to the detail of the OSPF LSA with the command
`show ip ospf database opaque-xxx`, it appears that only the Inter-AS
advertising router is abble to show the detail of the Inter-AS LSA. Foreign
routers are only abble to show the header of this Inster-AS LSA. The problem
comes from the registration of Inter-AS management functions which is done
only on the advetising router. So, the function `ospf_mpls_te_show_info()` is
never call on neighbor routers that have not resgistered Inter-AS management
callback functions.
First, this patch modify functions `set_linkparams_inter_as()` and
`unset_linkparams_inter_as()` to respectively set and unset flags that control
the Inter-AS LSA flooding. Flag & Type from `struct mpls_te_link` have been
redefined: Flag is used to determine if flooding is AS or not and Type is only
used to determine the type of the LSA.
Second, this patch register Inter-AS management functions for both AS and Area
flooding with a different function for LSA origination as parameter is passed
as void and it is mandatory to determine the flooding context:
`struct *ospf` for AS flooding and `struct *ospf_area` for Area flooding.
Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
Diffstat (limited to 'ospfd/ospf_te.h')
-rw-r--r-- | ospfd/ospf_te.h | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/ospfd/ospf_te.h b/ospfd/ospf_te.h index 97217eb35..b3a85dff6 100644 --- a/ospfd/ospf_te.h +++ b/ospfd/ospf_te.h @@ -74,25 +74,22 @@ #define GMPLS 0x02 #define INTER_AS 0x04 #define PSEUDO_TE 0x08 -#define FLOOD_AREA 0x10 -#define FLOOD_AS 0x20 -#define EMULATED 0x80 +#define EMULATED 0x10 -#define IS_STD_TE(x) (x & STD_TE) +#define IS_STD_TE(x) (x & STD_TE) #define IS_PSEUDO_TE(x) (x & PSEUDO_TE) #define IS_INTER_AS(x) (x & INTER_AS) #define IS_EMULATED(x) (x & EMULATED) -#define IS_FLOOD_AREA(x) (x & FLOOD_AREA) -#define IS_FLOOD_AS(x) (x & FLOOD_AS) -#define IS_INTER_AS_EMU(x) (x & INTER_AS & EMULATED) -#define IS_INTER_AS_AS(x) (x & INTER_AS & FLOOD_AS) /* Flags to manage TE Link LSA */ -#define LPFLG_LSA_INACTIVE 0x0 -#define LPFLG_LSA_ACTIVE 0x1 -#define LPFLG_LSA_ENGAGED 0x2 -#define LPFLG_LOOKUP_DONE 0x4 -#define LPFLG_LSA_FORCED_REFRESH 0x8 +#define LPFLG_LSA_INACTIVE 0x00 +#define LPFLG_LSA_ACTIVE 0x01 +#define LPFLG_LSA_ENGAGED 0x02 +#define LPFLG_LOOKUP_DONE 0x04 +#define LPFLG_LSA_FORCED_REFRESH 0x08 +#define LPFLG_LSA_FLOOD_AS 0x10 + +#define IS_FLOOD_AS(x) (x & LPFLG_LSA_FLOOD_AS) /* Macro to log debug message */ #define ote_debug(...) \ |