summaryrefslogtreecommitdiffstats
path: root/bgpd
diff options
context:
space:
mode:
authorLou Berger <lberger@labn.net>2016-09-27 13:54:56 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2016-09-30 18:56:54 +0200
commite55281983efaa904d40ce903996b30d20f74eb52 (patch)
treef2d6f3921c2fc9fc88cf19323b528a591611a37d /bgpd
parentmemory: restore 'memstats:' keyword when logging memstats - useful in log (diff)
downloadfrr-e55281983efaa904d40ce903996b30d20f74eb52.tar.xz
frr-e55281983efaa904d40ce903996b30d20f74eb52.zip
bgpd: remove old/duplicate, and now out of order prefixlen test
Diffstat (limited to 'bgpd')
-rw-r--r--bgpd/bgp_mplsvpn.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/bgpd/bgp_mplsvpn.c b/bgpd/bgp_mplsvpn.c
index 91f0e91b3..36ba65af1 100644
--- a/bgpd/bgp_mplsvpn.c
+++ b/bgpd/bgp_mplsvpn.c
@@ -146,17 +146,17 @@ bgp_nlri_parse_vpn (struct peer *peer, struct attr *attr,
pnt += BGP_ADDPATH_ID_LEN;
}
+ /* Fetch prefix length. */
+ prefixlen = *pnt++;
+ p.family = afi2family (packet->afi);
+ psize = PSIZE (prefixlen);
+
if (prefixlen < 88)
{
zlog_err ("prefix length is less than 88: %d", prefixlen);
return -1;
}
- /* Fetch prefix length. */
- prefixlen = *pnt++;
- p.family = afi2family (packet->afi);
- psize = PSIZE (prefixlen);
-
/* sanity check against packet data */
if (prefixlen < VPN_PREFIXLEN_MIN_BYTES*8 || (pnt + psize) > lim)
{