Skip to content

Commit

Permalink
Fix: Filter properly on path-group name for stun profiles
Browse files Browse the repository at this point in the history
  • Loading branch information
gmuloc committed Dec 19, 2023
1 parent 74ed1f3 commit 3296485
Show file tree
Hide file tree
Showing 6 changed files with 76 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,13 @@ router path-selection
!
local interface Ethernet1
!
path-group MPLS id 500
!
local interface Ethernet2
!
load-balance policy LBPOLICY
path-group INET
path-group MPLS
!
router adaptive-virtual-topology
topology role pathfinder
Expand Down Expand Up @@ -80,6 +85,11 @@ interface Ethernet1
no switchport
ip address 10.7.7.7/31
!
interface Ethernet2
no shutdown
no switchport
ip address 172.16.0.1/31
!
interface Loopback0
description Router_ID
no shutdown
Expand Down Expand Up @@ -144,5 +154,6 @@ management api http-commands
stun
server
local-interface Ethernet1
local-interface Ethernet2
!
end
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,20 @@ router path-selection
name cv-pathfinder-pathfinder
ipv4 address 10.7.7.7
!
path-group MPLS id 500
!
local interface Ethernet2
stun server-profile cv-pathfinder-pathfinder-MPLS-1
!
peer dynamic
!
peer static router-ip 192.168.44.1
name cv-pathfinder-pathfinder
ipv4 address 172.16.0.1
!
load-balance policy LBPOLICY
path-group INET
path-group MPLS
!
router adaptive-virtual-topology
topology role transit region
Expand Down Expand Up @@ -92,6 +104,11 @@ interface Ethernet1
no switchport
ip address dhcp
!
interface Ethernet2
no shutdown
no switchport
ip address 172.16.6.6/31
!
interface Loopback0
description Router_ID
no shutdown
Expand Down Expand Up @@ -153,5 +170,7 @@ stun
client
server-profile cv-pathfinder-pathfinder-INET-0
ip address 10.7.7.7/31
server-profile cv-pathfinder-pathfinder-MPLS-0
ip address 172.16.0.1/31
!
end
Original file line number Diff line number Diff line change
Expand Up @@ -146,21 +146,32 @@ router_path_selection:
local_interfaces:
- name: Ethernet1
ipsec_profile: CP-PROFILE
- name: MPLS
id: 500
local_interfaces:
- name: Ethernet2
load_balance_policies:
- name: LBPOLICY
path_groups:
- name: INET
- name: MPLS
peer_dynamic_source: stun
stun:
server:
local_interfaces:
- Ethernet1
- Ethernet2
ethernet_interfaces:
- name: Ethernet1
peer_type: l3_interface
ip_address: 10.7.7.7/31
shutdown: false
type: routed
- name: Ethernet2
peer_type: l3_interface
ip_address: 172.16.0.1/31
shutdown: false
type: routed
dps_interfaces:
- name: Dps1
description: DPS Interface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,21 +158,43 @@ router_path_selection:
ipv4_addresses:
- 10.7.7.7
ipsec_profile: CP-PROFILE
- name: MPLS
id: 500
local_interfaces:
- name: Ethernet2
stun:
server_profiles:
- cv-pathfinder-pathfinder-MPLS-1
dynamic_peers:
enabled: true
static_peers:
- router_ip: 192.168.44.1
name: cv-pathfinder-pathfinder
ipv4_addresses:
- 172.16.0.1
load_balance_policies:
- name: LBPOLICY
path_groups:
- name: INET
- name: MPLS
stun:
client:
server_profiles:
- name: cv-pathfinder-pathfinder-INET-0
ip_address: 10.7.7.7/31
- name: cv-pathfinder-pathfinder-MPLS-0
ip_address: 172.16.0.1/31
ethernet_interfaces:
- name: Ethernet1
peer_type: l3_interface
ip_address: dhcp
shutdown: false
type: routed
- name: Ethernet2
peer_type: l3_interface
ip_address: 172.16.6.6/31
shutdown: false
type: routed
dps_interfaces:
- name: Dps1
description: DPS Interface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,24 @@ l3_edge:
wan_carrier: Comcast
wan_circuit_id: 667
ip: dhcp
- node: cv-pathfinder-transit
interface: Ethernet2
wan_path_group: MPLS
wan_carrier: Colt
wan_circuit_id: 10666
ip: 172.16.6.6/31
- node: cv-pathfinder-pathfinder
interface: Ethernet1
wan_path_group: INET
wan_carrier: Bouygues Telecom
wan_circuit_id: 777
ip: 10.7.7.7/31
- node: cv-pathfinder-pathfinder
interface: Ethernet2
wan_path_group: MPLS
wan_carrier: Colt
wan_circuit_id: 10000
ip: 172.16.0.1/31
- node: cv-pathfinder-pathfinder1
interface: Ethernet1
wan_path_group: INET
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ def _get_local_interfaces(self, path_group_name: str) -> list | None:
self._stun_server_profile_name(wrr, path_group_name, index)
for wrr, data in self._wan_route_servers.items()
for index, path_group in enumerate(get(data, "wan_path_groups", required=True))
if path_group.get("name") == path_group_name
]
if stun_server_profiles:
local_interface["stun"] = {"server_profiles": stun_server_profiles}
Expand Down

0 comments on commit 3296485

Please sign in to comment.