Skip to content

Commit 4d19332

Browse files
committed
flow/parser: fix parsing for IPv6 next hop
Don't attempt to parse ASN if it is not specified.
1 parent 908cae8 commit 4d19332

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/exabgp/configuration/flow/parser.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,9 @@ def redirect(tokeniser):
298298
raise ValueError('route target is a 32 bits number, value too large %s' % route_target)
299299
return NoNextHop, ExtendedCommunities().add(TrafficRedirect(asn, route_target))
300300
else:
301+
if count == 2:
302+
return IP.create(data), ExtendedCommunities().add(TrafficNextHopSimpson(False))
303+
301304
elements = data.split(':')
302305
ip = ':'.join(elements[:-1])
303306
asn = int(elements[-1])

0 commit comments

Comments
 (0)