diff options
author | David Lamparter <equinox@opensourcerouting.org> | 2017-09-07 15:58:18 +0200 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2017-09-09 19:50:58 +0200 |
commit | 937652c6e43fc74ba969bbace475bdf929cdc5d0 (patch) | |
tree | f2cdea6d59fa9e2f20eafc512fe21203f6acdd6b /ospfd/ospf_opaque.h | |
parent | Merge pull request #1118 from opensourcerouting/attr-kill-master (diff) | |
download | frr-937652c6e43fc74ba969bbace475bdf929cdc5d0.tar.xz frr-937652c6e43fc74ba969bbace475bdf929cdc5d0.zip |
*: fix be32 reading / 24-bit left shift
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'ospfd/ospf_opaque.h')
-rw-r--r-- | ospfd/ospf_opaque.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ospfd/ospf_opaque.h b/ospfd/ospf_opaque.h index 2470cd2e2..9dc1f92f4 100644 --- a/ospfd/ospf_opaque.h +++ b/ospfd/ospf_opaque.h @@ -46,7 +46,8 @@ #define GET_OPAQUE_ID(lsid) ((u_int32_t)(lsid)&LSID_OPAQUE_ID_MASK) #define SET_OPAQUE_LSID(type, id) \ - ((((type) << 24) & LSID_OPAQUE_TYPE_MASK) | ((id)&LSID_OPAQUE_ID_MASK)) + ((((unsigned)(type) << 24) & LSID_OPAQUE_TYPE_MASK) \ + | ((id) & LSID_OPAQUE_ID_MASK)) /* * Opaque LSA types will be assigned by IANA. |