diff -c 2.6-orig/devinet.c 2.6/devinet.c *** 2.6-orig/devinet.c 2007-09-20 15:32:16.000000000 -0700 --- 2.6/devinet.c 2007-09-19 11:29:32.000000000 -0700 *************** *** 1,3 **** --- 1,6 ---- + /*27-Aug-07 22:27:25, Edit by vaf */ + /* use /24 default netmask for "class-E" space */ + /* * NET3 IP device support routines. * *************** *** 594,599 **** --- 597,604 ---- rc = 16; else if (IN_CLASSC(haddr)) rc = 24; + else if (IN_CLASSE(haddr)) + rc = 24; } return rc; diff -c 2.6-orig/fib_frontend.c 2.6/fib_frontend.c *** 2.6-orig/fib_frontend.c 2007-09-20 15:32:16.000000000 -0700 --- 2.6/fib_frontend.c 2007-09-19 11:29:30.000000000 -0700 *************** *** 1,3 **** --- 1,6 ---- + /*16-Aug-07 16:26:55, 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 *************** *** 152,158 **** struct fib_result res; unsigned ret = RTN_BROADCAST; ! if (ZERONET(addr) || BADCLASS(addr)) return RTN_BROADCAST; if (MULTICAST(addr)) return RTN_MULTICAST; --- 155,161 ---- 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 2.6-orig/in.h 2.6/in.h *** 2.6-orig/in.h 2007-09-20 15:33:11.000000000 -0700 --- 2.6/in.h 2007-09-19 11:29:32.000000000 -0700 *************** *** 1,3 **** --- 1,5 ---- + /*27-Aug-07 22:26:39, Edit by vaf */ + /* add macros for "class-E"; remove those for BADCLASS and EXPERIMENTAL */ /* * INET An implementation of the TCP/IP protocol suite for the LINUX * operating system. INET is implemented using the BSD Socket *************** *** 215,222 **** --- 217,232 ---- #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 2.6-orig/ipconfig.c 2.6/ipconfig.c *** 2.6-orig/ipconfig.c 2007-09-20 15:32:16.000000000 -0700 --- 2.6/ipconfig.c 2007-09-19 11:29:31.000000000 -0700 *************** *** 1,3 **** --- 1,5 ---- + /*28-Aug-07 10:21:56, Edit by vaf */ + /* add default net mask for "class-E" */ /* * $Id: ipconfig.c,v 1.46 2002/02/01 22:01:04 davem Exp $ * *************** *** 379,384 **** --- 381,388 ---- 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 2.6-orig/route.c 2.6/route.c *** 2.6-orig/route.c 2007-09-20 15:32:16.000000000 -0700 --- 2.6/route.c 2007-09-19 11:29:31.000000000 -0700 *************** *** 1,3 **** --- 1,5 ---- + /*16-Aug-07 16:25:26, Edit by vaf */ + /* remove checks for BADCLASS to allow "class-E" source/destination addresses */ /* * INET An implementation of the TCP/IP protocol suite for the LINUX * operating system. INET is implemented using the BSD Socket *************** *** 1140,1146 **** 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)) { --- 1142,1148 ---- 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)) { *************** *** 1617,1623 **** if (in_dev == NULL) return -EINVAL; ! if (MULTICAST(saddr) || BADCLASS(saddr) || LOOPBACK(saddr) || skb->protocol != htons(ETH_P_IP)) goto e_inval; --- 1619,1625 ---- if (in_dev == NULL) return -EINVAL; ! if (MULTICAST(saddr) || saddr == INADDR_BROADCAST || LOOPBACK(saddr) || skb->protocol != htons(ETH_P_IP)) goto e_inval; *************** *** 1935,1941 **** by fib_lookup. */ ! if (MULTICAST(saddr) || BADCLASS(saddr) || LOOPBACK(saddr)) goto martian_source; if (daddr == htonl(0xFFFFFFFF) || (saddr == 0 && daddr == 0)) --- 1937,1943 ---- by fib_lookup. */ ! if (MULTICAST(saddr) || saddr == INADDR_BROADCAST || LOOPBACK(saddr)) goto martian_source; if (daddr == htonl(0xFFFFFFFF) || (saddr == 0 && daddr == 0)) *************** *** 1947,1953 **** if (ZERONET(saddr)) goto martian_source; ! if (BADCLASS(daddr) || ZERONET(daddr) || LOOPBACK(daddr)) goto martian_destination; /* --- 1949,1955 ---- if (ZERONET(saddr)) goto martian_source; ! if (ZERONET(daddr) || LOOPBACK(daddr)) goto martian_destination; /* *************** *** 2171,2177 **** res->type = RTN_BROADCAST; else if (MULTICAST(fl->fl4_dst)) res->type = RTN_MULTICAST; ! else if (BADCLASS(fl->fl4_dst) || ZERONET(fl->fl4_dst)) return -EINVAL; if (dev_out->flags & IFF_LOOPBACK) --- 2173,2179 ---- res->type = RTN_BROADCAST; else if (MULTICAST(fl->fl4_dst)) res->type = RTN_MULTICAST; ! else if (ZERONET(fl->fl4_dst)) return -EINVAL; if (dev_out->flags & IFF_LOOPBACK) *************** *** 2391,2397 **** if (oldflp->fl4_src) { err = -EINVAL; if (MULTICAST(oldflp->fl4_src) || ! BADCLASS(oldflp->fl4_src) || ZERONET(oldflp->fl4_src)) goto out; --- 2393,2399 ---- if (oldflp->fl4_src) { err = -EINVAL; if (MULTICAST(oldflp->fl4_src) || ! oldflp->fl4_src == INADDR_BROADCAST || ZERONET(oldflp->fl4_src)) goto out;