summaryrefslogtreecommitdiffstats
path: root/ospfd/ospf_opaque.h
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2017-09-07 15:58:18 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2017-09-09 19:50:58 +0200
commit937652c6e43fc74ba969bbace475bdf929cdc5d0 (patch)
treef2cdea6d59fa9e2f20eafc512fe21203f6acdd6b /ospfd/ospf_opaque.h
parentMerge pull request #1118 from opensourcerouting/attr-kill-master (diff)
downloadfrr-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.h3
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.