[Bug 270351] Incompatible change in route(8) utility since 13.x

From: <bugzilla-noreply_at_freebsd.org>
Date: Sun, 19 Mar 2023 20:56:51 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=270351

            Bug ID: 270351
           Summary: Incompatible change in route(8) utility since 13.x
           Product: Base System
           Version: 13.1-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: net@FreeBSD.org
          Reporter: eugen@freebsd.org

Let's show small example.

# route add 192.168.0.0/16 -iface lo0 -reject
add net 192.168.0.0: gateway lo0

# route add 192.168.0.0/24 1.1.1.1 # over bge1
add net 192.168.0.0: gateway 1.1.1.1

# route add -host 192.168.0.0 -iface tun0 # or ng0
add host 192.168.0.0: gateway tun0

# route -n get -host 192.168.0.0
   route to: 192.168.0.0
destination: 192.168.0.0
        fib: 0
  interface: tun0
      flags: <UP,HOST,DONE,STATIC>
 recvpipe  sendpipe  ssthresh  rtt,msec    mtu        weight    expire
       0         0         0         0      1500         1         0

So far, so good. And now:
# route -n get -net 192.168.0.0
   route to: 192.168.0.0
destination: 192.168.0.0
        fib: 0
  interface: tun0
      flags: <UP,HOST,DONE,STATIC>
 recvpipe  sendpipe  ssthresh  rtt,msec    mtu        weight    expire
       0         0         0         0      1500         1         0

Wrong. This is HOST route, it should skip it while looking up.

This works just fine in 12.x and earlier showing another (non-host) route:
# route -n get -net 192.168.0.0
   route to: 192.168.0.0
destination: 192.168.0.0
       mask: 255.255.0.0
        fib: 0
  interface: lo0
      flags: <UP,REJECT,DONE,STATIC>
 recvpipe  sendpipe  ssthresh  rtt,msec    mtu        weight    expire
       0         0         0         0     16384         1         0

-- 
You are receiving this mail because:
You are the assignee for the bug.