Frr: Blackhole route on FreeBSD IPv6 (since version FRR5) not installed in kernel table

Created on 14 Oct 2019  路  7Comments  路  Source: FRRouting/frr

Blackhole routes are not installed in the freebsd kernel table
Os Version: FreeBSD 11.3-RELEASE-p3); customized kernel (Generic + IPSEC).
I tried this with frr5, frr6,frr7 and with frr master (frr-7.1-dev-809-gf043157c5). (It is working in frr3)


(put "x" in "[ ]" if you already tried following)
[ ] Did you check if this is a duplicate issue?
[x] Did you test it on the latest FRRouting/frr master branch?

To Reproduce
Steps to reproduce the behavior:

IPv4 Issue:
`root@freebsd-k1-frr-serial:/usr/local/etc/frr # netstat -nr4 | grep 10.94.208.0
root@freebsd-k1-frr-serial:/usr/local/etc/frr # vtysh

Hello, this is FRRouting (version 7.3-dev-MyOwnFRRVersion-g43157c5).
Copyright 1996-2005 Kunihiro Ishiguro, et al.

This is a git build of frr-7.1-dev-809-gf043157c5
Associated branch(es):
local:master
github/frrouting/frr.git/master

freebsd-k1# conf t
freebsd-k1(config)# ip route 10.94.208.0/24 Null0
freebsd-k1(config)# exit
freebsd-k1# sho ip route 10.94.208.0/24
Routing entry for 10.94.208.0/24
Known via "static", distance 1, metric 0, best
Last update 00:07:57 ago

  • unreachable (blackhole)

freebsd-k1# exit
root@freebsd-k1-frr-serial:/usr/local/etc/frr # netstat -nr4 | grep 10.94.208.0
`

IPv6 Issue:
`root@freebsd-k1-frr-serial:/usr/local/etc/frr # netstat -nr6 | grep 2001:db8:81e::/48
root@freebsd-k1-frr-serial:/usr/local/etc/frr # vtysh

Hello, this is FRRouting (version 7.3-dev-MyOwnFRRVersion-g43157c5).
Copyright 1996-2005 Kunihiro Ishiguro, et al.

This is a git build of frr-7.1-dev-809-gf043157c5
Associated branch(es):
local:master
github/frrouting/frr.git/master

freebsd-k1# show ip route 2001:db8:81e::/48
% Network not in table
freebsd-k1# conf t
freebsd-k1(config)# ipv6 route 2001:db8:81e::/48 Null0
freebsd-k1(config)# exit
freebsd-k1# show ip route 2001:db8:81e::/48
Routing entry for 2001:db8:81e::/48
Known via "static", distance 1, metric 0, best
Last update 00:00:06 ago

  • unreachable (blackhole)

freebsd-k1# exit
root@freebsd-k1-frr-serial:/usr/local/etc/frr # netstat -nr6 | grep 2001:db8:81e::/48
`
These routes could be installed by OS Commands:

IPv4:
root@freebsd-k1-frr-serial:/usr/local/etc/frr # netstat -nr4 | grep 10.94.208.0 root@freebsd-k1-frr-serial:/usr/local/etc/frr # route add -net 10.94.208.0/24 -interface lo0 -blackhole add net 10.94.208.0: gateway lo0 root@freebsd-k1-frr-serial:/usr/local/etc/frr # netstat -nr4 | grep 10.94.208.0 10.94.208.0/24 lo0 USB lo0 root@freebsd-k1-frr-serial:/usr/local/etc/frr #

IPv6:
root@freebsd-k1-frr-serial:/usr/local/etc/frr # netstat -nr6 | grep 2001:db8:81e:: root@freebsd-k1-frr-serial:/usr/local/etc/frr # route add -inet6 -net 2001:db8:81e:: -prefixlen 48 -interface lo0 -blackhole add net 2001:db8:81e::: gateway lo0 root@freebsd-k1-frr-serial:/usr/local/etc/frr # netstat -nr6 | grep 2001:db8:81e:: 2001:db8:81e::/48 lo0 USB lo0 root@freebsd-k1-frr-serial:/usr/local/etc/frr #
Versions

  • OS Kernel: FreeBSD 11.3-RELEASE-p3; customized kernel (Generic + IPSEC)
  • FRR Version [5,6,7,7-dev]
triage

All 7 comments

seems fixed.
@polychaeta autoclose in 1week.

IPv6 blackhole routes are not working as of FreeBSD 12.1, FRR 7.3.

See also: https://github.com/FRRouting/frr/blob/frr-7.3/zebra/rt_socket.c#L192-L194

@neirbowj can you confirm v4 work as expected?

I will reopen with just v6 if thats the case.

@sworleys Confirmed.

router(config)# ip route 10.1.2.0/24 blackhole
router(config)# end
router# sh ip route 10.1.2.0/24
Routing entry for 10.1.2.0/24
  Known via "static", distance 1, metric 0, best
  Last update 00:01:14 ago
  * unreachable (blackhole), weight 1

router# exit
server# route get 10.1.2.3
   route to: 10.1.2.3
destination: 10.1.2.0
       mask: 255.255.255.0
    gateway: localhost
        fib: 0
  interface: lo0
      flags: <UP,GATEWAY,DONE,BLACKHOLE,PROTO1>
 recvpipe  sendpipe  ssthresh  rtt,msec    mtu        weight    expire
       0         0         0         0     16384         1         0

awesome, i will open it back up and implement it.

Fixed in #6365.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mshuttle76 picture mshuttle76  路  6Comments

VictorCaiShen picture VictorCaiShen  路  7Comments

louberger picture louberger  路  9Comments

ne-vlezay80 picture ne-vlezay80  路  6Comments

anspectrum picture anspectrum  路  9Comments