Skip to content

Commit

Permalink
fix bad peer as
Browse files Browse the repository at this point in the history
Signed-off-by: Peng Xiao <xiaoquwl@gmail.com>
  • Loading branch information
xiaopeng163 committed May 11, 2017
1 parent 90a42b4 commit 37f4b01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion yabgp/message/open.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def parse(self, message):
self.asn = str(self.asn).split('.')
self.asn = 65536 * (int(self.asn[0])) + int(self.asn[1])

if self.asn in (0, 2 ** 16 - 1):
if self.asn == 0:
# bad peer asn
raise excp.OpenMessageError(
sub_error=bgp_cons.ERR_MSG_OPEN_BAD_PEER_AS,
Expand Down

0 comments on commit 37f4b01

Please sign in to comment.