diff options
| author | Olivier Dugeon <olivier.dugeon@orange.com> | 2018-02-19 10:17:41 +0100 |
|---|---|---|
| committer | Olivier Dugeon <olivier.dugeon@orange.com> | 2018-02-19 10:17:41 +0100 |
| commit | d922605d28fc929d962bcc586bced0453543cc3a (patch) | |
| tree | 2444e2f1552583098b891bbc2f644a30b6c2a1b6 /ospfd/ospf_sr.h | |
| parent | 97133f7f9f3c69addde1c9375d2229008e2e979f (diff) | |
OSPFD: Fix Segment Routing Lan Adjacency TLVs
- Lan Adjacency TLVs was incorrectly formatted due to an error in
TLV size computation. Add new macro to fix this issue
- Update SR link nexthop when it corresponds to an LAN Adj SID. The nexthop
is set to the router id in the TLVi (as per draft), but we need the neighbor
IP address to set the corresponding MPLS LFIB entry
Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
Diffstat (limited to 'ospfd/ospf_sr.h')
| -rw-r--r-- | ospfd/ospf_sr.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/ospfd/ospf_sr.h b/ospfd/ospf_sr.h index cb7d0833ec..4d3f5f441a 100644 --- a/ospfd/ospf_sr.h +++ b/ospfd/ospf_sr.h @@ -49,11 +49,10 @@ /* Segment Routing TLVs as per draft-ietf-ospf-segment-routing-extensions-19 */ /* Segment ID could be a Label (3 bytes) or an Index (4 bytes) */ -#define SID_BASE_SIZE 4 #define SID_LABEL 3 -#define SID_LABEL_SIZE (SID_BASE_SIZE + SID_LABEL) +#define SID_LABEL_SIZE(U) (U - 1) #define SID_INDEX 4 -#define SID_INDEX_SIZE (SID_BASE_SIZE + SID_INDEX) +#define SID_INDEX_SIZE(U) (U) /* SID/Label Sub TLV - section 2.1 */ #define SUBTLV_SID_LABEL 1 |
