ra: fix routing loop on point to point links
authorHans Dedecker <dedeckeh@gmail.com>
Sat, 9 Jan 2021 20:17:48 +0000 (21:17 +0100)
committerHans Dedecker <dedeckeh@gmail.com>
Sun, 10 Jan 2021 20:01:12 +0000 (21:01 +0100)
commit53f07e90b7f1da6977143a488dd5cb73a33b233b
treec7584811e9b43d078e83107eac195cb4cb4c68a5
parent2b6959dfe2095402e004b63d9aca9900c074abb6
ra: fix routing loop on point to point links

For point-to-point links (e.g. PPP) don't create a link prefix route
when receiving a prefix information option with the on-link flag set.
Point-to-point links are non shared media and as such a destination
IPv6 address cannot be on-link.
If a link prefix route points to a point-to-point link it can trigger
a routing loop if the destination IPv6 address belongs to the prefix.
If such a packet is received and not directed to a local IPv6 address
it will be routed to the point-to-point link due to the link prefix route;
the upstream ISP router will route the IPv6 packet back due to the assigned
prefix route creating a "ping pong" effect

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
src/ra.c