HomeFreeBSD

Fix blackhole/reject routes.

Description

Fix blackhole/reject routes.

Traditionally *BSD routing stack required to supply some
interface data for blackhole/reject routes. This lead to
varieties of hacks in routing daemons when inserting such routes.
With the recent routeing stack changes, gateway sockaddr without
RTF_GATEWAY started to be treated differently, purely as link
identifier.

This change broke net/bird, which installs blackhole routes with
127.0.0.1 gateway without RTF_GATEWAY flags.

Fix this by automatically constructing necessary gateway data at
rtsock level if RTF_REJECT/RTF_BLACKHOLE is set.

Reported by: Marek Zarychta <zarychtam at plan-b.pwste.edu.pl>
Reviewed by: donner

(cherry picked from commit 145bf6c0af48b89f13465e145f4516de37c31d85)

Details

Provenance
melifaroAuthored on Feb 8 2021, 11:29 PM
Parents
R10:0b45290603b9: Partially revert libcxxrt changes to avoid _Unwind_Exception change
Branches
Unknown
Tags
Unknown