]>
git.proxmox.com Git - iproute2.git/blob - debian/patches/f_u32
4505533652ad4d61ac57a01286c5a0b0ea375dd5
3 ## All lines beginning with `## DP:' are a description of the patch.
4 ## DP: Fixes the u32 calculation for 2.6 kernel - by Russell Stuart <russell-debian@stuart.id.au>
6 [ -f debian
/patches
/00patch-opts
] && . debian
/patches
/00patch-opts
7 patch_opts
="${patch_opts:--f --no-backup-if-mismatch}"
10 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
14 -patch) patch $patch_opts -p1 < $0;;
15 -unpatch) patch $patch_opts -p1 -R < $0;;
17 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
23 diff -Nur iproute-20051007.keep
/tc
/f_u32.c iproute-20051007
/tc
/f_u32.c
24 --- iproute-20051007.keep
/tc
/f_u32.c
2006-01-12 17:34:37.000000000 +1000
25 +++ iproute-20051007
/tc
/f_u32.c
2006-02-07 17:10:29.000000000 +1000
29 #include <sys/socket.h>
30 +#include <sys/utsname.h>
31 #include <netinet/in.h>
32 #include <arpa/inet.h>
35 htid
= (handle
&0xFFFFF000);
36 } else if (strcmp
(*argv
, "sample") == 0) {
38 + struct utsname utsname
;
40 struct tc_u32_sel sel
;
41 struct tc_u32_key keys
[4];
45 hash = sel2.sel.keys
[0].val
&sel2.sel.keys
[0].mask
;
49 + if (strncmp
(utsname.release
, "2.4.", 4) == 0) {
54 + __u32 mask
= sel2.sel.keys
[0].mask
;
55 + while (mask
&& !(mask
& 1)) {
61 htid
= ((hash<<12)&0xFF000)|(htid&0xFFF00000);