Skip to content

Commit

Permalink
edit message format
Browse files Browse the repository at this point in the history
Signed-off-by: Peng Xiao <xiaoquwl@gmail.com>
  • Loading branch information
xiaopeng163 committed Mar 22, 2017
1 parent 13b8adb commit 0993ec0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions yabgp/core/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ def update_received(self, timestamp, msg):
self.factory.write_msg(
timestamp=result['time'],
msg_type=6,
msg={'msg': msg},
msg=msg,
flush=True
)
LOG.error(
Expand Down Expand Up @@ -272,7 +272,7 @@ def update_received(self, timestamp, msg):
self.factory.write_msg(
timestamp=result['time'],
msg_type=bgp_cons.MSG_UPDATE,
msg={"msg": msg}
msg=msg
)
if self.factory.flush_and_check_file_size():
for afi, safi in CONF.bgp.running_config[self.factory.peer_addr]['capability']['remote']['afi_safi']:
Expand Down Expand Up @@ -337,7 +337,7 @@ def notification_received(self, msg):
self.factory.write_msg(
timestamp=time.time(),
msg_type=3,
msg={"msg": nofi_msg},
msg=nofi_msg,
flush=True
)
self.fsm.notification_received(msg[0], msg[1])
Expand Down Expand Up @@ -375,7 +375,7 @@ def keepalive_received(self, timestamp, msg):
self.factory.write_msg(
timestamp=timestamp,
msg_type=4,
msg={"msg": None},
msg=None,
flush=True
)
self.fsm.keep_alive_received()
Expand Down Expand Up @@ -464,7 +464,7 @@ def open_received(self, timestamp, msg):
self.factory.write_msg(
timestamp=timestamp,
msg_type=1,
msg={"msg": parse_result},
msg=parse_result,
flush=True
)
self.peer_id = open_msg.bgp_id
Expand Down Expand Up @@ -513,7 +513,7 @@ def route_refresh_received(self, msg, msg_type):
self.factory.write_msg(
timestamp=time.time(),
msg_type=msg_type,
msg={"msg": nofi_msg},
msg=nofi_msg,
flush=True
)

Expand Down

0 comments on commit 0993ec0

Please sign in to comment.