diff options
| author | Andrii Melnychenko <a.melnychenko@vyos.io> | 2026-01-07 13:14:11 +0100 |
|---|---|---|
| committer | Andrii Melnychenko <a.melnychenko@vyos.io> | 2026-01-30 04:25:54 +0100 |
| commit | d4f230af1cc31447289a7e30640a471a818cfd69 (patch) | |
| tree | be58051108127df6f5d700691441425cedb891c6 /accel-pppd/radius | |
| parent | 048d31cb446879e0d1a1471b4ab99135a92bf289 (diff) | |
| download | accel-ppp-d4f230af1cc31447289a7e30640a471a818cfd69.tar.gz accel-ppp-d4f230af1cc31447289a7e30640a471a818cfd69.zip | |
netlink: Added VRF support
Added VRF support to the iproute routines.
Updated iproute* calls in the ipoe, radius, and dhcpv6 code.
Signed-off-by: Andrii Melnychenko <a.melnychenko@vyos.io>
Diffstat (limited to 'accel-pppd/radius')
| -rw-r--r-- | accel-pppd/radius/radius.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/accel-pppd/radius/radius.c b/accel-pppd/radius/radius.c index 8dbbe1cd..143c237c 100644 --- a/accel-pppd/radius/radius.c +++ b/accel-pppd/radius/radius.c @@ -801,8 +801,7 @@ static void ses_started(struct ap_session *ses) bool gw_spec = !IN6_IS_ADDR_UNSPECIFIED(&fr6->gw); char nbuf[INET6_ADDRSTRLEN]; char gwbuf[INET6_ADDRSTRLEN]; - - if (ip6route_add(gw_spec ? 0 : rpd->ses->ifindex, &fr6->prefix, fr6->plen, gw_spec ? &fr6->gw : NULL, 3, fr6->prio)) { + if (ip6route_add(gw_spec ? 0 : rpd->ses->ifindex, &fr6->prefix, fr6->plen, gw_spec ? &fr6->gw : NULL, 3, fr6->prio, rpd->ses->vrf_name)) { log_ppp_warn("radius: failed to add route %s/%hhu %s %u\n", u_ip6str(&fr6->prefix, nbuf), fr6->plen, u_ip6str(&fr6->gw, gwbuf), fr6->prio); @@ -810,7 +809,7 @@ static void ses_started(struct ap_session *ses) } for (fr = rpd->fr; fr; fr = fr->next) { - if (iproute_add(fr->gw ? 0 : rpd->ses->ifindex, 0, fr->dst, fr->gw, 3, fr->mask, fr->prio)) { + if (iproute_add(fr->gw ? 0 : rpd->ses->ifindex, 0, fr->dst, fr->gw, 3, fr->mask, fr->prio, rpd->ses->vrf_name)) { char dst[17], gw[17]; u_inet_ntoa(fr->dst, dst); u_inet_ntoa(fr->gw, gw); @@ -849,12 +848,12 @@ static void ses_finishing(struct ap_session *ses) * when the interface is removed. */ if (!IN6_IS_ADDR_UNSPECIFIED(&fr6->gw)) - ip6route_del(0, &fr6->prefix, fr6->plen, &fr6->gw, 3, fr6->prio); + ip6route_del(0, &fr6->prefix, fr6->plen, &fr6->gw, 3, fr6->prio, rpd->ses->vrf_name); } for (fr = rpd->fr; fr; fr = fr->next) { if (fr->gw) - iproute_del(0, 0, fr->dst, fr->gw, 3, fr->mask, fr->prio); + iproute_del(0, 0, fr->dst, fr->gw, 3, fr->mask, fr->prio, rpd->ses->vrf_name); } if (rpd->acct_started || rpd->acct_req) |
