interface-ip: fix IPv4 route target masking
authorJo-Philipp Wich <jo@mein.io>
Tue, 14 Nov 2023 13:01:44 +0000 (14:01 +0100)
committerJo-Philipp Wich <jo@mein.io>
Tue, 14 Nov 2023 13:32:53 +0000 (14:32 +0100)
commit8587c074f1eb2064c42adb0a6aa5073f695ab89d
tree3533b9ed54e34335822ec8e3dcb1d63d613935a4
parentc739dee0a37bc593aaed7ae3f0a61e3d7c1fb1ac
interface-ip: fix IPv4 route target masking

A previous commit supposed to mask out excess host bits in route targets
failed to correctly calculate the mask value, causing it to produce
improper results for certain mask lengths.

Fixes: #17
Fixes: 76eb342 ("interface-ip: mask out host bits in IPv4 route targets")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
interface-ip.c