On Fri, Apr 08, 2011 at 11:43:16AM -0600, Warner Losh wrote:
> > Non-contigous netmasks are legal in IPv4.  What do you do if someone adds
> > the CIDR flag but the netmask cannot be represented in CIDR notation?
> 
> They have become illegal in the fullness of time.

I'll rephrase my point, then:  not all netmasks, legal or otherwise,
that are accepted by ifconfig, can be represented in CIDR notation
(see below).   

I guess the fact that ifconfig accepts them is a bug - but that
merely changes my comment to "Non-contigous netmasks are accepted
for IPv4 addresses by some (buggy) utilities.  What do you do if
someone adds the CIDR flag, but the netmask cannot be represented
in CIDR notation?".

Cheers,
Mike

[root@cheddar ~]# ifconfig bridge99 create
[root@cheddar ~]# ifconfig bridge99 127.255.0.1 netmask 255.255.255.1
[root@cheddar ~]# ifconfig bridge99
bridge99: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether d6:c6:07:a9:7e:b9
        inet 127.255.0.1 netmask 0xffffff01 broadcast 127.255.0.255
[root@cheddar ~]# uname -a
FreeBSD cheddar.urgle.com 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Thu Feb 24 
23:04:32 GMT 2011     r...@cheddar.urgle.com:/usr/obj/usr/src/sys/GENERIC  amd64
[root@cheddar ~]# 

-- 
Mike Bristow                                          m...@urgle.com

_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"

Reply via email to