On 9/1/20 4:40 AM, mastertheknife wrote: > > P.S: while reading the relevant code in the kernel, i think i spotted > some mistake in net/ipv4/route.c, in function "update_or_create_fnhe". > It looks like it loops over all the exceptions for the nexthop entry, > but always overwriting the first (and only) entry, so effectively only > 1 exception can exist per nexthop entry. > Line 678: > "if (fnhe) {" > Should probably be: > "if (fnhe && fnhe->fnhe_daddr == daddr) {" >
Right above that line is: for (fnhe = rcu_dereference(hash->chain); fnhe; fnhe = rcu_dereference(fnhe->fnhe_next)) { if (fnhe->fnhe_daddr == daddr) break; depth++; } so fnhe is set based on daddr match.