Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 09 Sep 2023 10:26:38 +0000
From:      bugzilla-noreply@freebsd.org
To:        net@FreeBSD.org
Subject:   [Bug 273640] route delete fails when specifying both -inet and -iface
Message-ID:  <bug-273640-7501-TTaC9vrIN4@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-273640-7501@https.bugs.freebsd.org/bugzilla/>
References:  <bug-273640-7501@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D273640

--- Comment #4 from Zhenlei Huang <zlei@FreeBSD.org> ---
(In reply to mmendoza from comment #0)

> Example route:
> # route show -inet default
>    route to: default
> destination: default
>        mask: default
>     gateway: 10.0.5.1
>         fib: 0
>   interface: vmx0
>       flags: <UP,GATEWAY,DONE,STATIC>
>  recvpipe  sendpipe  ssthresh  rtt,msec    mtu       weight    expire
       0         0         0         0      1500        0         0

Option `-iface` of route(8) is for directly connected route. In the above
example, the `default` or `0.0.0.0/0` is not directly connected. It does not
make sense if you try to delete it with option `-iface`.


(In reply to mmendoza from comment #2)
> Further tests indicate that it's only an issue with combining both "-inet=
" and
> "-iface" (IPv6 works), and only when the CIDR size is omitted. This works:
> # route del -inet 192.168.1.0/24 -iface vmx0

I bet your route `192.168.1.0/24` is directly connected. It may looks like:
```
   route to: 192.168.1.0
destination: 192.168.1.0
       mask: 255.255.255.0
        fib: 0
  interface: vmx0
      flags: <UP,DONE,PINNED>
 recvpipe  sendpipe  ssthresh  rtt,msec    mtu       weight    expire
       0         0         0         0      1500        1         0
```

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-273640-7501-TTaC9vrIN4>