Skip to content

Commit

Permalink
make sure healthcheck uses neighbor *
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-mangin committed Sep 18, 2023
1 parent 66d08fb commit 5913d81
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/exabgp/application/healthcheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -488,12 +488,12 @@ def exabgp(target):
as_path = options.as_path
for ip in options.ips:
if options.withdraw_on_down or target is states.EXIT:
command = "announce" if target is states.UP else "withdraw"
command = "neighbor * announce" if target is states.UP else "neighbor * withdraw"
else:
command = "announce"
command = "neighbor * announce"
announce = "route {0} next-hop {1}".format(str(ip), options.next_hop or "self")

if command == "announce":
if command == "neighbor * announce":
announce = "{0} med {1}".format(announce, metric)
if options.local_preference >= 0:
announce = "{0} local-preference {1}".format(announce, options.local_preference)
Expand Down

0 comments on commit 5913d81

Please sign in to comment.