diff -c openwrt-orig/devinet.c openwrt/devinet.c *** openwrt-orig/devinet.c 2007-09-20 14:38:59.000000000 -0700 --- openwrt/devinet.c 2007-09-20 14:39:01.000000000 -0700 *************** *** 1,3 **** --- 1,5 ---- + /*19-Sep-07 16:31:37, Edit by vaf */ + /* treat "class-E" same as "class-C" in inet_abc_len */ /* * NET3 IP device support routines. * *************** *** 448,453 **** --- 450,457 ---- return 16; if (IN_CLASSC(addr)) return 24; + if (IN_CLASSE(addr)) + return 24; /* * Something else, probably a multicast. diff -c openwrt-orig/fib_frontend.c openwrt/fib_frontend.c *** openwrt-orig/fib_frontend.c 2007-09-20 14:39:00.000000000 -0700 --- openwrt/fib_frontend.c 2007-09-20 14:38:59.000000000 -0700 *************** *** 1,3 **** --- 1,7 ---- + /*19-Sep-07 16:33:43, Edit by vaf */ + /* replace check for "BADCLASS" with explicit check for INADDR_BROADCAST */ + + /* * INET An implementation of the TCP/IP protocol suite for the LINUX * operating system. INET is implemented using the BSD Socket *************** *** 174,180 **** struct fib_result res; unsigned ret = RTN_BROADCAST; ! if (ZERONET(addr) || BADCLASS(addr)) return RTN_BROADCAST; if (MULTICAST(addr)) return RTN_MULTICAST; --- 178,184 ---- struct fib_result res; unsigned ret = RTN_BROADCAST; ! if (ZERONET(addr) || addr == INADDR_BROADCAST) return RTN_BROADCAST; if (MULTICAST(addr)) return RTN_MULTICAST; diff -c openwrt-orig/in.h openwrt/in.h *** openwrt-orig/in.h 2007-09-20 14:39:00.000000000 -0700 --- openwrt/in.h 2007-09-20 14:39:01.000000000 -0700 *************** *** 1,3 **** --- 1,7 ---- + /*19-Sep-07 16:28:59, Edit by vaf */ + /* support for "class-E"; no more IN_BADCLASS or IN_EXPERIMENTAL */ + + /* * INET An implementation of the TCP/IP protocol suite for the LINUX * operating system. INET is implemented using the BSD Socket *************** *** 209,216 **** --- 213,228 ---- #define IN_MULTICAST(a) IN_CLASSD(a) #define IN_MULTICAST_NET 0xF0000000 + #define IN_CLASSE(a) ((((long int) (a)) & 0xf0000000) == 0xf0000000) + #define IN_CLASSE_NET 0xffffff00 + #define IN_CLASSE_NSHIFT 8 + #define IN_CLASSE_HOST (0xffffffff & ~IN_CLASSE_NET) + + /* + * these are no longer used #define IN_EXPERIMENTAL(a) ((((long int) (a)) & 0xf0000000) == 0xf0000000) #define IN_BADCLASS(a) IN_EXPERIMENTAL((a)) + */ /* Address to accept any incoming messages. */ #define INADDR_ANY ((unsigned long int) 0x00000000) diff -c openwrt-orig/ipconfig.c openwrt/ipconfig.c *** openwrt-orig/ipconfig.c 2007-09-20 14:39:00.000000000 -0700 --- openwrt/ipconfig.c 2007-09-20 14:39:00.000000000 -0700 *************** *** 1,3 **** --- 1,5 ---- + /*19-Sep-07 16:35:44, Edit by vaf */ + /* add default net mask for "class-E" */ /* * $Id: ipconfig.c,v 1.43.2.1 2001/12/13 10:39:53 davem Exp $ * *************** *** 366,371 **** --- 368,375 ---- ic_netmask = htonl(IN_CLASSB_NET); else if (IN_CLASSC(ntohl(ic_myaddr))) ic_netmask = htonl(IN_CLASSC_NET); + else if (IN_CLASSE(ntohl(ic_myaddr))) + ic_netmask = htonl(IN_CLASSE_NET); else { printk(KERN_ERR "IP-Config: Unable to guess netmask for address %u.%u.%u.%u\n", NIPQUAD(ic_myaddr)); diff -c openwrt-orig/route.c openwrt/route.c *** openwrt-orig/route.c 2007-09-20 14:39:01.000000000 -0700 --- openwrt/route.c 2007-09-20 14:39:01.000000000 -0700 *************** *** 1,3 **** --- 1,5 ---- + /*19-Sep-07 16:42:52, Edit by vaf */ + /* remove checks for BADCLASS to allow "class-E" addresses */ /* * INET An implementation of the TCP/IP protocol suite for the LINUX * operating system. INET is implemented using the BSD Socket *************** *** 853,859 **** return; if (new_gw == old_gw || !IN_DEV_RX_REDIRECTS(in_dev) ! || MULTICAST(new_gw) || BADCLASS(new_gw) || ZERONET(new_gw)) goto reject_redirect; if (!IN_DEV_SHARED_MEDIA(in_dev)) { --- 855,861 ---- return; if (new_gw == old_gw || !IN_DEV_RX_REDIRECTS(in_dev) ! || MULTICAST(new_gw) || new_gw == INADDR_BROADCAST || ZERONET(new_gw)) goto reject_redirect; if (!IN_DEV_SHARED_MEDIA(in_dev)) { *************** *** 1316,1322 **** if (in_dev == NULL) return -EINVAL; ! if (MULTICAST(saddr) || BADCLASS(saddr) || LOOPBACK(saddr) || skb->protocol != htons(ETH_P_IP)) goto e_inval; --- 1318,1324 ---- if (in_dev == NULL) return -EINVAL; ! if (MULTICAST(saddr) || saddr == INADDR_BROADCAST || LOOPBACK(saddr) || skb->protocol != htons(ETH_P_IP)) goto e_inval; *************** *** 1430,1436 **** by fib_lookup. */ ! if (MULTICAST(saddr) || BADCLASS(saddr) || LOOPBACK(saddr)) goto martian_source; if (daddr == 0xFFFFFFFF || (saddr == 0 && daddr == 0)) --- 1432,1438 ---- by fib_lookup. */ ! if (MULTICAST(saddr) || saddr == INADDR_BROADCAST || LOOPBACK(saddr)) goto martian_source; if (daddr == 0xFFFFFFFF || (saddr == 0 && daddr == 0)) *************** *** 1442,1448 **** if (ZERONET(saddr)) goto martian_source; ! if (BADCLASS(daddr) || ZERONET(daddr) || LOOPBACK(daddr)) goto martian_destination; /* --- 1444,1450 ---- if (ZERONET(saddr)) goto martian_source; ! if (ZERONET(daddr) || LOOPBACK(daddr)) goto martian_destination; /* *************** *** 1804,1810 **** if (oldkey->src) { err = -EINVAL; if (MULTICAST(oldkey->src) || ! BADCLASS(oldkey->src) || ZERONET(oldkey->src)) goto out; --- 1806,1812 ---- if (oldkey->src) { err = -EINVAL; if (MULTICAST(oldkey->src) || ! oldkey->src == INADDR_BROADCAST || ZERONET(oldkey->src)) goto out; *************** *** 1962,1968 **** res.type = RTN_BROADCAST; else if (MULTICAST(key.dst)) res.type = RTN_MULTICAST; ! else if (BADCLASS(key.dst) || ZERONET(key.dst)) goto e_inval; if (dev_out->flags & IFF_LOOPBACK) --- 1964,1970 ---- res.type = RTN_BROADCAST; else if (MULTICAST(key.dst)) res.type = RTN_MULTICAST; ! else if (ZERONET(key.dst)) goto e_inval; if (dev_out->flags & IFF_LOOPBACK)