]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix blackhole/reject routes.
authorAlexander V. Chernikov <melifaro@FreeBSD.org>
Mon, 8 Feb 2021 23:29:05 +0000 (23:29 +0000)
committerAlexander V. Chernikov <melifaro@FreeBSD.org>
Sat, 13 Mar 2021 20:18:17 +0000 (20:18 +0000)
commit3489286a5f368e7fcf11a9691f9bb5df77abe9a3
tree3f5dfb5b3f2508fee3681a99012d11984193c807
parent0b45290603b9d294dc2fbbf6d7b8fa20acd60175
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)
sys/net/rtsock.c