diff options
author | Olivier Dugeon <olivier.dugeon@orange.com> | 2017-07-31 18:03:00 +0200 |
---|---|---|
committer | Olivier Dugeon <olivier.dugeon@orange.com> | 2017-07-31 18:03:00 +0200 |
commit | 5d0df50febdd73cf29783efb60b6f4d2f36a3fc9 (patch) | |
tree | 7ae554591cc6d727f248cded057594790728de7a /ospfd/ospf_ri.c | |
parent | Correct code style as requested by review of PR839 (diff) | |
download | frr-5d0df50febdd73cf29783efb60b6f4d2f36a3fc9.tar.xz frr-5d0df50febdd73cf29783efb60b6f4d2f36a3fc9.zip |
Correct build TLV functions
* Functions that build TLVs in ospf_te.c and ospf_te.c use 'tlvh + 1'
to move the pointer to the TLV payload ifor strem_put().
* Correct this by using TLV_DATA() macro which is saffer.
Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
Diffstat (limited to 'ospfd/ospf_ri.c')
-rw-r--r-- | ospfd/ospf_ri.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ospfd/ospf_ri.c b/ospfd/ospf_ri.c index e41b9c152..13013bf8c 100644 --- a/ospfd/ospf_ri.c +++ b/ospfd/ospf_ri.c @@ -506,7 +506,7 @@ static void build_tlv(struct stream *s, struct tlv_header *tlvh) if (ntohs(tlvh->type) != 0) { build_tlv_header(s, tlvh); - stream_put(s, tlvh + 1, TLV_BODY_SIZE(tlvh)); + stream_put(s, TLV_DATA(tlvh), TLV_BODY_SIZE(tlvh)); } return; } |