dhcpcd-discuss

dhcpcd is using incorrect /8 netmask when adding routes

Dan Weinlader

Fri Jul 03 15:25:48 2015

I am using dhcpcd to manage both eth0 and wlan0 on a linux machine. I have
dhcpcd configured to use static routes for specific SSIDs on the wlan0
interface like this:

---- dhcpcd.conf ----
hostname
require dhcp_server_identifier
nohook lookup-hostname resolv timezone yp ntp
noipv4ll
timeout 0

interface wlan0

ssid XXXXXX
static ip_address=10.78.0.12/16
static routers=10.78.0.1
static domain_name_servers=8.8.8.8
release

-----

The problem is that it is generating routes with a /8 netmask:

> route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use
Iface
0.0.0.0         10.10.56.1      0.0.0.0         UG    202    0        0 eth0
0.0.0.0         10.78.0.1       0.0.0.0         UG    303    0        0
wlan0
10.0.0.0        0.0.0.0         255.0.0.0       U     303    0        0
wlan0   <<<< This one
10.10.56.0      0.0.0.0         255.255.255.0   U     202    0        0 eth0
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo

When I run dhcpcd manually and specify a static ip address on the command
line, it still uses a /8 netmask.

With the *exact* same config, dhcpcd 6.4.7 generated a /16 route entry for
the interface, but 6.9.0 generates a /8.

System details: 32bit Linux 4.0.2 kernel and Gentoo userspace, installed
hooks: 10-wpa_supplicant and 15-timezone.

Any suggestions/thoughts? More details needed? Thanks.

Regards,

Dan

Follow-Ups:
Re: dhcpcd is using incorrect /8 netmask when adding routesRoy Marples
Archive administrator: postmaster@marples.name