Page MenuHome Accel-ppp

VRF does not work for IPoE shared interfaces
Open, HighPublicBUG

Description

[modules]
log_file
radius
ippool
ipoe

[ipoe]
verbose=1
username=ifname
lease-time=600
renew-time=300
max-lease-time=3600
shared=1
ifcfg=1
mode=L2
start=dhcpv4
ip-unnumbered=1
proxy-arp=1
ip-pool=ipoe
interface=re:ens224
gw-ip-address=100.64.0.1/24

[ip-pool]
100.64.0.0/24,name=ipoe
gw-ip-address=100.64.0.1/24

Shared interfaces based on routes like ip route add <Client IP addr>/32 dev ipoeX via <Client GW>, so if ipoeX interface migrates to VRF, the kernel does not know what need to do with received packets on root interface, in my case, it is ens224.

Details

Protocol
General
Version
1.12.0-163-gcca47ac

Event Timeline

additional information and patches how it should works

 		ses = ipoe_lookup_rt4(skb, saddr, &out);
+		if (!ses && i->mode < 3)
+			ses = ipoe_lookup_hwaddr(eth->h_source);

It will not work if there in the conditions below:

  1. two sessions in L2 ipoe shared mode
  2. the same interface (e.g. eth0)
  3. first session without vrf
  4. second session with vrf
  5. the same ip.src for both sessions

In this case, only first session will be found by ses = ipoe_lookup_rt4(skb, saddr, &out);, second session will not work

also, we have to check driver performance when ipoe_lookup_hwaddr is used for many sessions (many sessions in vrf)

Dimka88 triaged this task as High priority.May 13 2022, 10:48