summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_attr_evpn.c
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 /bgpd/bgp_attr_evpn.c
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 'bgpd/bgp_attr_evpn.c')
-rw-r--r--bgpd/bgp_attr_evpn.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/bgpd/bgp_attr_evpn.c b/bgpd/bgp_attr_evpn.c
index 6ead05926..300c9ddb5 100644
--- a/bgpd/bgp_attr_evpn.c
+++ b/bgpd/bgp_attr_evpn.c
@@ -144,11 +144,8 @@ u_int32_t bgp_attr_mac_mobility_seqnum(struct attr *attr, u_char *sticky)
*sticky = 0;
pnt++;
- seq_num = (*pnt++ << 24);
- seq_num |= (*pnt++ << 16);
- seq_num |= (*pnt++ << 8);
- seq_num |= (*pnt++);
-
+ pnt = ptr_get_be32(pnt, &seq_num);
+ (void)pnt; /* consume value */
return seq_num;
}