diff options
Diffstat (limited to 'net/sched')
-rw-r--r-- | net/sched/cls_rsvp.h | 28 | ||||
-rw-r--r-- | net/sched/sch_htb.c | 4 | ||||
-rw-r--r-- | net/sched/sch_netem.c | 12 | ||||
-rw-r--r-- | net/sched/sch_teql.c | 11 |
4 files changed, 30 insertions, 25 deletions
diff --git a/net/sched/cls_rsvp.h b/net/sched/cls_rsvp.h index 7034ea4530e5..dd9414e44200 100644 --- a/net/sched/cls_rsvp.h +++ b/net/sched/cls_rsvp.h | |||
@@ -170,21 +170,23 @@ restart: | |||
170 | for (s = sht[h1]; s; s = s->next) { | 170 | for (s = sht[h1]; s; s = s->next) { |
171 | if (dst[RSVP_DST_LEN-1] == s->dst[RSVP_DST_LEN-1] && | 171 | if (dst[RSVP_DST_LEN-1] == s->dst[RSVP_DST_LEN-1] && |
172 | protocol == s->protocol && | 172 | protocol == s->protocol && |
173 | !(s->dpi.mask & (*(u32*)(xprt+s->dpi.offset)^s->dpi.key)) | 173 | !(s->dpi.mask & |
174 | (*(u32*)(xprt+s->dpi.offset)^s->dpi.key)) && | ||
174 | #if RSVP_DST_LEN == 4 | 175 | #if RSVP_DST_LEN == 4 |
175 | && dst[0] == s->dst[0] | 176 | dst[0] == s->dst[0] && |
176 | && dst[1] == s->dst[1] | 177 | dst[1] == s->dst[1] && |
177 | && dst[2] == s->dst[2] | 178 | dst[2] == s->dst[2] && |
178 | #endif | 179 | #endif |
179 | && tunnelid == s->tunnelid) { | 180 | tunnelid == s->tunnelid) { |
180 | 181 | ||
181 | for (f = s->ht[h2]; f; f = f->next) { | 182 | for (f = s->ht[h2]; f; f = f->next) { |
182 | if (src[RSVP_DST_LEN-1] == f->src[RSVP_DST_LEN-1] && | 183 | if (src[RSVP_DST_LEN-1] == f->src[RSVP_DST_LEN-1] && |
183 | !(f->spi.mask & (*(u32*)(xprt+f->spi.offset)^f->spi.key)) | 184 | !(f->spi.mask & (*(u32*)(xprt+f->spi.offset)^f->spi.key)) |
184 | #if RSVP_DST_LEN == 4 | 185 | #if RSVP_DST_LEN == 4 |
185 | && src[0] == f->src[0] | 186 | && |
186 | && src[1] == f->src[1] | 187 | src[0] == f->src[0] && |
187 | && src[2] == f->src[2] | 188 | src[1] == f->src[1] && |
189 | src[2] == f->src[2] | ||
188 | #endif | 190 | #endif |
189 | ) { | 191 | ) { |
190 | *res = f->res; | 192 | *res = f->res; |
@@ -493,13 +495,13 @@ static int rsvp_change(struct tcf_proto *tp, unsigned long base, | |||
493 | for (sp = &data->ht[h1]; (s=*sp) != NULL; sp = &s->next) { | 495 | for (sp = &data->ht[h1]; (s=*sp) != NULL; sp = &s->next) { |
494 | if (dst[RSVP_DST_LEN-1] == s->dst[RSVP_DST_LEN-1] && | 496 | if (dst[RSVP_DST_LEN-1] == s->dst[RSVP_DST_LEN-1] && |
495 | pinfo && pinfo->protocol == s->protocol && | 497 | pinfo && pinfo->protocol == s->protocol && |
496 | memcmp(&pinfo->dpi, &s->dpi, sizeof(s->dpi)) == 0 | 498 | memcmp(&pinfo->dpi, &s->dpi, sizeof(s->dpi)) == 0 && |
497 | #if RSVP_DST_LEN == 4 | 499 | #if RSVP_DST_LEN == 4 |
498 | && dst[0] == s->dst[0] | 500 | dst[0] == s->dst[0] && |
499 | && dst[1] == s->dst[1] | 501 | dst[1] == s->dst[1] && |
500 | && dst[2] == s->dst[2] | 502 | dst[2] == s->dst[2] && |
501 | #endif | 503 | #endif |
502 | && pinfo->tunnelid == s->tunnelid) { | 504 | pinfo->tunnelid == s->tunnelid) { |
503 | 505 | ||
504 | insert: | 506 | insert: |
505 | /* OK, we found appropriate session */ | 507 | /* OK, we found appropriate session */ |
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c index 2e38d1abd830..508cf5f3a6d5 100644 --- a/net/sched/sch_htb.c +++ b/net/sched/sch_htb.c | |||
@@ -1344,8 +1344,8 @@ static int htb_change_class(struct Qdisc *sch, u32 classid, | |||
1344 | }; | 1344 | }; |
1345 | 1345 | ||
1346 | /* check for valid classid */ | 1346 | /* check for valid classid */ |
1347 | if (!classid || TC_H_MAJ(classid ^ sch->handle) | 1347 | if (!classid || TC_H_MAJ(classid ^ sch->handle) || |
1348 | || htb_find(classid, sch)) | 1348 | htb_find(classid, sch)) |
1349 | goto failure; | 1349 | goto failure; |
1350 | 1350 | ||
1351 | /* check maximal depth */ | 1351 | /* check maximal depth */ |
diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c index 2b88295cb7b7..d8b10e054627 100644 --- a/net/sched/sch_netem.c +++ b/net/sched/sch_netem.c | |||
@@ -199,9 +199,9 @@ static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch) | |||
199 | * do it now in software before we mangle it. | 199 | * do it now in software before we mangle it. |
200 | */ | 200 | */ |
201 | if (q->corrupt && q->corrupt >= get_crandom(&q->corrupt_cor)) { | 201 | if (q->corrupt && q->corrupt >= get_crandom(&q->corrupt_cor)) { |
202 | if (!(skb = skb_unshare(skb, GFP_ATOMIC)) | 202 | if (!(skb = skb_unshare(skb, GFP_ATOMIC)) || |
203 | || (skb->ip_summed == CHECKSUM_PARTIAL | 203 | (skb->ip_summed == CHECKSUM_PARTIAL && |
204 | && skb_checksum_help(skb))) { | 204 | skb_checksum_help(skb))) { |
205 | sch->qstats.drops++; | 205 | sch->qstats.drops++; |
206 | return NET_XMIT_DROP; | 206 | return NET_XMIT_DROP; |
207 | } | 207 | } |
@@ -210,9 +210,9 @@ static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch) | |||
210 | } | 210 | } |
211 | 211 | ||
212 | cb = netem_skb_cb(skb); | 212 | cb = netem_skb_cb(skb); |
213 | if (q->gap == 0 /* not doing reordering */ | 213 | if (q->gap == 0 || /* not doing reordering */ |
214 | || q->counter < q->gap /* inside last reordering gap */ | 214 | q->counter < q->gap || /* inside last reordering gap */ |
215 | || q->reorder < get_crandom(&q->reorder_cor)) { | 215 | q->reorder < get_crandom(&q->reorder_cor)) { |
216 | psched_time_t now; | 216 | psched_time_t now; |
217 | psched_tdiff_t delay; | 217 | psched_tdiff_t delay; |
218 | 218 | ||
diff --git a/net/sched/sch_teql.c b/net/sched/sch_teql.c index 5a002c247231..db69637069c4 100644 --- a/net/sched/sch_teql.c +++ b/net/sched/sch_teql.c | |||
@@ -190,10 +190,13 @@ static int teql_qdisc_init(struct Qdisc *sch, struct nlattr *opt) | |||
190 | 190 | ||
191 | if (m->slaves) { | 191 | if (m->slaves) { |
192 | if (m->dev->flags & IFF_UP) { | 192 | if (m->dev->flags & IFF_UP) { |
193 | if ((m->dev->flags&IFF_POINTOPOINT && !(dev->flags&IFF_POINTOPOINT)) | 193 | if ((m->dev->flags & IFF_POINTOPOINT && |
194 | || (m->dev->flags&IFF_BROADCAST && !(dev->flags&IFF_BROADCAST)) | 194 | !(dev->flags & IFF_POINTOPOINT)) || |
195 | || (m->dev->flags&IFF_MULTICAST && !(dev->flags&IFF_MULTICAST)) | 195 | (m->dev->flags & IFF_BROADCAST && |
196 | || dev->mtu < m->dev->mtu) | 196 | !(dev->flags & IFF_BROADCAST)) || |
197 | (m->dev->flags & IFF_MULTICAST && | ||
198 | !(dev->flags & IFF_MULTICAST)) || | ||
199 | dev->mtu < m->dev->mtu) | ||
197 | return -EINVAL; | 200 | return -EINVAL; |
198 | } else { | 201 | } else { |
199 | if (!(dev->flags&IFF_POINTOPOINT)) | 202 | if (!(dev->flags&IFF_POINTOPOINT)) |