router: fix Lan host reachibility due to identical RIO and PIO prefixes (FS#3056)
authorHans Dedecker <dedeckeh@gmail.com>
Sun, 3 May 2020 19:17:53 +0000 (21:17 +0200)
committerHans Dedecker <dedeckeh@gmail.com>
Tue, 5 May 2020 19:18:25 +0000 (21:18 +0200)
commit49e4949c6dee4a7e528e9bc51e9813228c3c16d8
tree36946f61f52d30608257e38bf09bea20ffcd172c
parente53fec897838aca411cb5fcdb9bf795e73414565
router: fix Lan host reachibility due to identical RIO and PIO prefixes (FS#3056)

odhcpd includes RIO RA options according to requirement L3 in RFC7084.
However if the delegated prefix length received on the wan is equal to the
downstream delegated prefix length on the Lan this may pollute the
routing table of type C hosts as the RIO routing entry can take
precedence of the PIO routing entry meaning all traffic for the on link
hosts will go via the router iso direct on link communication.
If the traffic is dropped in the router hosts are unreachable; therefore
don't include RIO options with prefixes and prefix length identical to
those in a PIO RA option

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
(cherry picked from commit 5ce077026b991f49d96464587386f93d92f56385)
src/router.c