Skip to content

Commit

Permalink
Filter: Use as-list-group instead of as-path-group
Browse files Browse the repository at this point in the history
  • Loading branch information
vidister committed Sep 13, 2023
1 parent 9703cb9 commit 015da71
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wanda/irrd_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ def call_subprocess(self, command_array):
raise Exception("bgpq4 could not be called successfully, this may be an programming error or a bad internet connection.")

def call_bgpq4_aspath_access_list(self, asn, irr_name):
command_array = ["bgpq4", *self.host_params, "-f", str(asn), "-W 100", "-J", "-l", f"AS{asn}", irr_name]
command_array = ["bgpq4", *self.host_params, "-H", str(asn), "-W 1024", "-J", "-l", f"AS{asn}", irr_name]
return self.call_subprocess(command_array)

def generate_input_aspath_access_list(self, asn, irr_name):
# bgpq4 AS-TELIANET-V6 -f 1299 -W 100 -J -l AS1299
result_str = self.call_bgpq4_aspath_access_list(asn, irr_name)
m = re.search(r'.*as-path-group.*{(.|\n)*?}', result_str)
m = re.search(r'.*as-list-group.*{(.|\n)*?}', result_str)

if m:
# Technically, returning m[0] would work, but we do some cleaning for better quality of the generated configuration
Expand Down

0 comments on commit 015da71

Please sign in to comment.