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;
Ok, internet is not using classes anymore, there is no way you could have a
routing issue unless you have a miss configuration, the classes are only in
use to do the vlsm segmentation. I agree with this comment... I have LAN
that have subnet like 10.20.16.0/22 - the bottom address is 10.20.16.0, top
address is 10.20.19.255. I give out chunks of this with a DHCP pool, and
static map things into bits of it so I can easily have rules that let
different chunks of the LAN subnet get different access... e.g.
10.20.18.0-255 might be for private phones/tablets... - in this case
10.20.18.0 and 10.20.18.255 are perfectly useable addresses. Or I could set
the LAN IP of pfSense to 10.20.16.255 without problem.

I don't agree with you to prevent the use of 0 or 255.

Im sorry
On Oct 26, 2014 3:48 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)
>
> Can you be more specific?  Thank you. Alberto Palau <
> notifications@github.com> , 26.10.2014 20:09: 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)
> 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>. — Reply to
> this email directly or view it on GitHub.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/pfsense/pfsense/pull/1316/files#r19383233>.
>