+2006-03-21 Stephen Hemminger <shemminger@freekitty.pdx.osdl.net>
+
+ * Back out the 2.4 utsname patch
+
2006-03-21 James Lentini <jlentini@netapp.com>
* Increase size of hw address allowed for ip neigh to allow
#include <syslog.h>
#include <fcntl.h>
#include <sys/socket.h>
-#include <sys/utsname.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <string.h>
} else if (strcmp(*argv, "sample") == 0) {
__u32 hash;
unsigned divisor = 0x100;
- struct utsname utsname;
+
struct {
struct tc_u32_sel sel;
struct tc_u32_key keys[4];
NEXT_ARG();
}
hash = sel2.sel.keys[0].val&sel2.sel.keys[0].mask;
- uname(&utsname);
- if (strncmp(utsname.release, "2.4.", 4) == 0) {
- hash ^= hash>>16;
- hash ^= hash>>8;
- }
- else {
- __u32 mask = sel2.sel.keys[0].mask;
- while (mask && !(mask & 1)) {
- mask >>= 1;
- hash >>= 1;
- }
- hash &= 0xFF;
- }
+ hash ^= hash>>16;
+ hash ^= hash>>8;
htid = ((hash%divisor)<<12)|(htid&0xFFF00000);
sample_ok = 1;
continue;