Here are my untested (but simple) changes to SFQ to make it share 
outgoing bandwidth "fairly" per ip address (roughly, per local user) instead of
being susceptible to being tricked by users with many connections.  Don't use
this on the wrong side of a NAT box where there is only one source ip address 
in use.

In net/sched/sch_sfq.c:

Change:

                h = iph->daddr;
                h2 = iph->saddr^iph->protocol;
                if (!(iph->frag_off&htons(IP_MF|IP_OFFSET)) &&
                    (iph->protocol == IPPROTO_TCP ||
                     iph->protocol == IPPROTO_UDP ||
                     iph->protocol == IPPROTO_ESP))
                        h2 ^= *(((u32*)iph) + iph->ihl);
                break;

To:
                h = h2 = iph->saddr;
                break;


_______________________________________________
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

Reply via email to