★ wanayoo — archive 1999 http://www.kernelnotes.org/patch/21-p0515.htmlNouvelle recherche | Portail wanayoo

IFF_POINTOPOINT and netmask patch

Miquel van Smoorenburg (miquels@cistron.nl)
Sun May 25 19:31:00 1997

[Home] [Linux 2.0] [Linux 2.1] [Information] [Software] [Distributions] [Links]

21-IFF_POINTOPOINT.patch
In current kernels (I used 2.1.39) a route is automatically added for an interface when it goes up. If a route gets added for a pointopoint interface, its netmask is ignored and just a host route is added to the destination address. I think it should be possible to let the kernel add a route to the remote network (destination address/interface netmask).

This makes sense; the netmask isn't used with the local address for a pointopoint interface, but it _is_ useful in combination with the destination address. The only time it makes sense to use the netmask in combination with the local interface address is when the local and the destination address are in the same network range - and then you could just as well use the destination address.

The current kernel code also does some other interesting things-

The patch below fixes this, and introduces a new sysctl parameter: ip_use_ptp_netmask. If it is off (0) then:

If ip_use_ptp_netmask is on (1), then:

ip_use_ptp_netmask defaults to 0. If people think it should default to 1, we could just as well delete the variable and not support the old way of doing things.




[Home] [Up] [Search] [FeedBack]

Copyleft © The LinuxHQ Project. Licensed under the GNU Public License.