aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched
diff options
context:
space:
mode:
Diffstat (limited to 'net/sched')
-rw-r--r--net/sched/sch_fq.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/net/sched/sch_fq.c b/net/sched/sch_fq.c
index f377702d4b91..3386cce4751e 100644
--- a/net/sched/sch_fq.c
+++ b/net/sched/sch_fq.c
@@ -224,13 +224,15 @@ static struct fq_flow *fq_classify(struct sk_buff *skb, struct fq_sched_data *q)
224 if (unlikely((skb->priority & TC_PRIO_MAX) == TC_PRIO_CONTROL)) 224 if (unlikely((skb->priority & TC_PRIO_MAX) == TC_PRIO_CONTROL))
225 return &q->internal; 225 return &q->internal;
226 226
227 /* SYNACK messages are attached to a listener socket. 227 /* SYNACK messages are attached to a TCP_NEW_SYN_RECV request socket
228 * 1) They are not part of a 'flow' yet 228 * 1) request sockets are not full blown,
229 * 2) We do not want to rate limit them (eg SYNFLOOD attack), 229 * they do not contain sk_pacing_rate
230 * 2) They are not part of a 'flow' yet
231 * 3) We do not want to rate limit them (eg SYNFLOOD attack),
230 * especially if the listener set SO_MAX_PACING_RATE 232 * especially if the listener set SO_MAX_PACING_RATE
231 * 3) We pretend they are orphaned 233 * 4) We pretend they are orphaned
232 */ 234 */
233 if (!sk || sk->sk_state == TCP_LISTEN) { 235 if (!sk || sk->sk_state == TCP_NEW_SYN_RECV) {
234 unsigned long hash = skb_get_hash(skb) & q->orphan_mask; 236 unsigned long hash = skb_get_hash(skb) & q->orphan_mask;
235 237
236 /* By forcing low order bit to 1, we make sure to not 238 /* By forcing low order bit to 1, we make sure to not