-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow "neighbor *" in route announce command, to match "all configured neighbors". Ref. Exa-Networks/exabgp#1179 Adapt the healthcheck module to allow this argument. Bump PKGREVISION.
- Loading branch information
Showing
4 changed files
with
38 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
$NetBSD: distinfo,v 1.19 2022/09/18 12:02:00 he Exp $ | ||
$NetBSD: distinfo,v 1.20 2024/02/19 12:54:09 he Exp $ | ||
|
||
BLAKE2s (exabgp-4.2.21.tar.gz) = 16efdd84722201dc7dac7297a9367535c1b5184f952728123a856a93ec4e302a | ||
SHA512 (exabgp-4.2.21.tar.gz) = 0efc7143191e8b557297e9329354c01e2418e0c4c45753941eba3a1f063e77d17a0efa7a14a3062764e45e709f0598f491c10e2c02e751590bb7c0943b61932b | ||
Size (exabgp-4.2.21.tar.gz) = 2933721 bytes | ||
SHA1 (patch-lib_exabgp_application_healthcheck.py) = af35c59feb16bcf79abbf615d9ed13205127c534 | ||
SHA1 (patch-lib_exabgp_reactor_api_command_limit.py) = 322747424f646d1e1e22bde6baa6e057ace51805 |
16 changes: 16 additions & 0 deletions
16
net/exabgp/patches/patch-lib_exabgp_application_healthcheck.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
$NetBSD: patch-lib_exabgp_application_healthcheck.py,v 1.3 2024/02/19 12:54:09 he Exp $ | ||
|
||
Change type of `--neighbor` argument from ip_address to str | ||
so that it can support '*' as a value. | ||
|
||
--- lib/exabgp/application/healthcheck.py.orig 2024-02-19 12:45:30.545761963 +0000 | ||
+++ lib/exabgp/application/healthcheck.py | ||
@@ -222,7 +222,7 @@ def parse(): | ||
help=("Instead of increasing the metric on health failure, " "withdraw the route"), | ||
) | ||
g.add_argument("--path-id", metavar='PATHID', type=int, default=None, help="path ID to advertise for the route") | ||
- g.add_argument("--neighbor", metavar='NEIGHBOR', type=ip_address, dest="neighbors", action="append", help="advertise the route to the selected neigbors") | ||
+ g.add_argument("--neighbor", metavar='NEIGHBOR', type=str, dest="neighbors", action="append", help="advertise the route to the selected neigbors") | ||
|
||
g = parser.add_argument_group("reporting") | ||
g.add_argument("--execute", metavar='CMD', type=str, action="append", help="execute CMD on state change") |
17 changes: 17 additions & 0 deletions
17
net/exabgp/patches/patch-lib_exabgp_reactor_api_command_limit.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
$NetBSD: patch-lib_exabgp_reactor_api_command_limit.py,v 1.1 2024/02/19 12:54:09 he Exp $ | ||
|
||
Allow "neighbor *" in route announce command, to match | ||
"all configured neighbors". | ||
Ref. https://github.com/Exa-Networks/exabgp/issues/1179 | ||
|
||
--- lib/exabgp/reactor/api/command/limit.py.orig 2024-02-19 12:41:58.477150474 +0000 | ||
+++ lib/exabgp/reactor/api/command/limit.py | ||
@@ -63,6 +63,8 @@ def extract_neighbors(command): | ||
|
||
def match_neighbor(description, name): | ||
for string in description: | ||
+ if string.strip() == 'neighbor *': | ||
+ return True | ||
if re.search(r'(^|\s)%s($|\s|,)' % re.escape(string), name) is None: | ||
return False | ||
return True |