[Bug 274483] [route] change interface is ignored

From: <bugzilla-noreply_at_freebsd.org>
Date: Sun, 15 Oct 2023 09:38:14 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=274483

            Bug ID: 274483
           Summary: [route] change interface is ignored
           Product: Base System
           Version: 13.2-RELEASE
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: dinoex@FreeBSD.org

FreeBSD 13.2-RELEASE-p1 releng/13.2-n254621-08b87f63a046 GENERIC amd64


Setup:
I route a public IP-network via gre tunnel.

For diagnostic reasons I switched routing over a second tunnel,
this failed to work.


Diagnostics:

# route get 192.0.2.128/25
   route to: 192.0.2.128
destination: 192.0.2.128
       mask: 255.255.255.128
        fib: 0
  interface: gre1
      flags: <UP,DONE,STATIC>
 recvpipe  sendpipe  ssthresh  rtt,msec    mtu        weight    expire
       0         0         0         0      1476         1         0


# route change 192.0.2.128/25 -interface gre2
change net 192.0.2.128: gateway gre2 fib 0


# route get 192.0.2.128/25
   route to: 192.0.2.128
destination: 192.0.2.128
       mask: 255.255.255.128
        fib: 0
  interface: gre1
      flags: <UP,DONE,STATIC>
 recvpipe  sendpipe  ssthresh  rtt,msec    mtu        weight    expire
       0         0         0         0      1476         1         0


Note this still shows "gre1" not "gre2"
The effective route is not changed as the output of route told above.


Workaround:

# route del 192.0.2.128/25
del net 192.0.2.128 fib 0
# route add 192.0.2.128/25 -interface gre2
add net 192.0.2.128: gateway gre2 fib 0

# route get 192.0.2.128/25
   route to: 192.0.2.128
destination: 192.0.2.128
       mask: 255.255.255.128
        fib: 0
  interface: gre2
      flags: <UP,DONE,STATIC>
 recvpipe  sendpipe  ssthresh  rtt,msec    mtu        weight    expire
       0         0         0         0      1476         1         0

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