Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Jun 2024 12:52:17 +0200
From:      Michael Gmelin <grembo@freebsd.org>
To:        "Poul-Henning Kamp" <phk@phk.freebsd.dk>
Cc:        Ronald Klop <ronald-lists@klop.ws>, current@freebsd.org
Subject:   Re: 14.1-R rc.conf/ifconfig netmask issue was really hard to figure out
Message-ID:  <20240612125217.68483cf9.grembo@freebsd.org>
In-Reply-To: <202406121039.45CAdal6010274@critter.freebsd.dk>
References:  <202406120747.45C7lRGZ009491@critter.freebsd.dk> <413984193.6719.1718185609109@localhost> <202406121039.45CAdal6010274@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help


On Wed, 12 Jun 2024 10:39:36 +0000
"Poul-Henning Kamp" <phk@phk.freebsd.dk> wrote:

> Ronald Klop writes:
> 
> > What do you thing about defaulting to /32 on a missing netmask?
> > An interface with 1 IP address without any information about the
> > network All traffic can go to the gateway.  
> 
> I dont think that will work ?
> 
> The gateway will not be inside any of the attached networks, so you
> have no route to it ?
> 

You can do an interface route hack

  sysrc static_routes="gateway default"
  sysrc route_gateway="-host 1.2.3.4 -interface bla0"
  sysrc route_default="default 1.2.3.4"

This is actually quite useful in some setups, but in the context of
deciding on default behavior when no mask is given this is probably not
very helpful.

Cheers

-- 
Michael Gmelin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20240612125217.68483cf9.grembo>