Skip to content

T4409: Fix Framed-Route with attr Accel-VRF-Name #927

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: current
Choose a base branch
from

Conversation

sever-sever
Copy link
Member

@sever-sever sever-sever commented Mar 13, 2025

Change summary

If you use the RADIUS attribute Accel-VRF-Name we are expecting a route in a specific VRF, the current implementation set the Framed-Route/Framed-IPv6-Route to the default VRf (no VRF)

Fixes this, so routes are installed in the proper VRF name

Get patches from the accel-ppp/accel-ppp#93

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component
  • Other (please describe):

Related Task(s)

Related PR(s)

RADIUS client config:

[email protected] Cleartext-Password := "user2"
    Service-Type = Framed-User,
    Framed-IP-Address = "100.64.0.12",
    Framed-IPv6-Prefix = "2001:db8:0:2c::/64",
    Delegated-IPv6-Prefix = 2001:db8:0:ff2c::/64,
    Accel-VRF-Name = "CGNAT-VRF",
    Framed-Route = "192.168.100.0/24 100.64.0.1 1",
    Framed-IPv6-Route = "2001:db8:1::/64 2001:db8:0:2c::1 1",
    Framed-Protocol = PPP

Before the fix Framed routes were in the default table, after the fix we can see them in the proper VRF

vyos@ppp-serv:~$ show l2tp-server sessions 
 ifname |        username        |     ip      |           ip6          |        ip6-dp        | calling-sid | rate-limit | state  |  uptime  | rx-bytes | tx-bytes 
--------+------------------------+-------------+------------------------+----------------------+-------------+------------+--------+----------+----------+----------
 l2tp1  | [email protected] | 100.64.0.10 | 2001:db8:0:2b:200::/64 | 2001:db8:0:ff2b::/64 | 192.0.2.2   |            | active | 01:22:46 | 894 B    | 2.3 KiB  
 l2tp0  | [email protected] | 100.64.0.12 | 2001:db8:0:2c:200::/64 | 2001:db8:0:ff2c::/64 | 192.0.2.2   |            | active | 01:03:25 | 6.9 KiB  | 1.7 KiB
vyos@ppp-serv:~$ 


vyos@ppp-serv:~$ show ip route vrf CGNAT-VRF 
Codes: K - kernel route, C - connected, S - static, R - RIP,
       O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, F - PBR,
       f - OpenFabric,
       > - selected route, * - FIB route, q - queued, r - rejected, b - backup
       t - trapped, o - offload failure

VRF CGNAT-VRF:
C>* 100.64.0.12/32 is directly connected, l2tp0, 01:00:38
K>* 192.168.100.0/24 [0/1] via 100.64.0.1, l2tp0, 01:00:38
vyos@ppp-serv:~$ 
vyos@ppp-serv:~$ 
vyos@ppp-serv:~$ show ipv6  route vrf CGNAT-VRF 
Codes: K - kernel route, C - connected, S - static, R - RIPng,
       O - OSPFv3, I - IS-IS, B - BGP, N - NHRP, T - Table,
       v - VNC, V - VNC-Direct, A - Babel, F - PBR,
       f - OpenFabric,
       > - selected route, * - FIB route, q - queued, r - rejected, b - backup
       t - trapped, o - offload failure

VRF CGNAT-VRF:
C>* 2001:db8:0:2c::/64 is directly connected, l2tp0, 01:00:47
K>* 2001:db8:1::/64 [0/1] via 2001:db8:0:2c::1, l2tp0, 01:00:47
C>* fe80::/64 is directly connected, l2tp0, 01:00:47
vyos@ppp-serv:~$ 

Checklist:

  • I have read the CONTRIBUTING document
  • I have linked this PR to one or more Phabricator Task(s)
  • My commit headlines contain a valid Task id
  • My change requires a change to the documentation
  • I have updated the documentation accordingly

If you use attribute Accel-VRF-Name we are expecting a
route in a specific VRF, the cuurent implementation
set the Framed-Route/Framed-IPv6-Route to the default VRf (no VRF)

Fixes this, so routes are installed in the proper VRF name
@sever-sever sever-sever requested a review from a team as a code owner March 13, 2025 12:07
Copy link

👍
No issues in PR Title / Commit Title

@github-actions github-actions bot added the current VyOS rolling release label Mar 13, 2025
@ChrisHills463
Copy link

Thanks for improving this! Do you have a suitable commit I can cherry-pick into my accel-ppp branch (so that you are maintained as the author)?

@sever-sever
Copy link
Member Author

Thanks for improving this! Do you have a suitable commit I can cherry-pick into my accel-ppp branch (so that you are maintained as the author)?

@ChrisHills463, there is nothing new, I did patches from your codebase

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
current VyOS rolling release
Development

Successfully merging this pull request may close these issues.

2 participants