Netmask bug, generates wrong netmask from /32 into /30 or smaller in mobile data

netmask bug, generates wrong netmask from /32 into /30 or smaller in mobile data.

i noticed in pinephone that netmask is wrong. netmask should be /32 in mobile data. something generates netmask something else than /32. it will be /30 or smaller in a way that it is not network or broadcast address. (i also found bug in android as well in android 11).

this bug does not occur if i disable modemmanager, eg25manager and others and use “wvdial” and “ppp” directly even in the same machine.

The netmask for the cellular data is provided by the carrier - so I don’t see how it can be wrong - of course if the carrier is misconfigured but that highly speculative.

/32 means there is only one IP and is rarely used - besides within spf where you can specific one IP as allowed host.

/30 is the most common for dialup as this includes the router in the assignment - which the device would need to be able to connect.

Many carriers and ISP uses /24 which makes room for 254 hosts then use isolation to block inter-device connections.

This is the most ‘economical’ approach for IPv4 as you don’t have to assign a specific gateway to every host but can have 1 gateway for each 253 hosts.

The netmask for the cellular data is provided by the carrier - so I don’t see how it can be wrong - of course if the carrier is misconfigured but that highly speculative.

information i managed to gather is that netmask is /32 for two different operators and public and local ip numbers like. (although bug does not cause any issues for 100.64.x.x based ip addresses). and for public ip:s, netmask is far wider than /30 in reality, because i manage to ping certain ip:s from outside of network but not from the device itself because of wrong netmask.

as i like i indicated, same hardware but different software gives different netmask.