Gateway Patchpack #1

-[util.inc] is_linklocal($ipaddr) is now fully LL aware for both ipv4 and ipv6;
-[util.inc] Added is_valid_iface_ipaddrv4($ipaddr) and is_valid_iface_ipaddrv6($ipaddr) to check if given $ipaddr can be actually used on interface;
-[filter.inc] filter_generate_user_rule($rule). Add missing gettext;
-[gwlb.inc] Don't create dynamic gateways for ifaces without IP address;
-[gwlb.inc] Don't monitor dynamic gateway with an invalid IP address by default;
Jmm. I don't agree
On Oct 26, 2014 1:00 PM, "Dmitriy K." <notifications@github.com> wrote:

> In etc/inc/util.inc:
>
> > +
> > +	/* ANY is not a usable IP address */
> > +	if ($ip_long == 0)
> > +		return false;
> > +
> > +	/* Let's extract first and last octets */
> > +	$ip_low  = $ip_long % 256;
> > +	$ip_high = $ip_long >> 24;
> > +
> > +
> > +	/* IP address start with 0 */
> > +	if ($ip_high == 0)
> > +		return false;
> > +
> > +	/* IP address can't end with 0 or 255 */
> > +	if ($ip_low == 0 || $ip_low == 255)
>
> You're right about usability of .0/.255 but what about routing issues?
> Personally, I've never used/saw a .0/.255 in real networks. Before
> implementing I've done some research and found out that some customers with
> .0/.255 were not be reachable from WAN in some cases and other "issues".
> Issues were not because IP address was a network identifier/broadcast
> address but only .0/.255 itself. So, I've decided to implement "safe"
> method.
>
> For example, my implementation allows to use .32 or .39 if you have a
> 192.168.0.32/29 network;
>
> That's perfectly correlates with your message and smaller subnets. If you
> meant something like 182.11.0.0/31 I wonder if ISP could give you one.
>
> Also, pfSense box could not be a border gateway. What if border gateway
> (for example, ISA/TMG) will not be able to route or .0/.255 will be blocked
> by security policy?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/pfsense/pfsense/pull/1316/files#r19382125>.
>