Claudio Jeker <[email protected]> wrote:

> On Wed, Nov 09, 2022 at 07:37:50AM +0000, Stuart Henderson wrote:
> > Seems some hosting providers have annoying "out of prefix"
> > default gateways whuch are painful to configure
> > (https://marc.info/?t=166782242200005&r=1&w=2), should
> > we give a pointer in route(8)?
> > 
> > Index: route.8
> > ===================================================================
> > RCS file: /cvs/src/sbin/route/route.8,v
> > retrieving revision 1.104
> > diff -u -p -r1.104 route.8
> > --- route.8 29 Jul 2022 18:28:32 -0000      1.104
> > +++ route.8 9 Nov 2022 07:29:59 -0000
> > @@ -596,6 +596,14 @@ Delete the
> >  route to the 192.168.5.0/24 network:
> >  .Pp
> >  .Dl # route delete -inet 192.168.5.0/24
> > +.Pp
> > +Add a static
> > +.Xr inet6 4
> > +route to a host which is on the vio0 interface that is outside the prefix
> > +configured on the interface, and use that host as a default gateway:
> > +.Pp
> > +.Dl # route add -inet6 2001:db8:efef::1 -cloning -link -iface vio0
> > +.Dl # route add -inet6 default 2001:db8:efef::1
> >  .Sh DIAGNOSTICS
> >  .Bl -diag
> >  .It "%s: gateway %s flags %x"
> > 
> 
> I'm fine with this for now. It would be great if we could make ifconfig do
> the right thing but that is more complex. Setting a destination (like on
> point-to-point interfaces) is shared with the broadcast address so
> IFF_BROADCAST handling needs to be adjusted.

Actually I prefer the route way, because it requires people to be explicit
in these circumstances.  If it is automatic, there is more chance of creating
non-working configurations no?

Reply via email to