Commit fb2eef41 authored by Patrick McHardy's avatar Patrick McHardy

[PKT_SCHED]: cls_rsvp: fix tcf_exts fallout

The continue is supposed to continue the outer loop, not break
out of the do { } while (0) loop. cls_route.c is also changed
in a similar way for clarity, although it behaved correctly.
Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
parent 203956f6
...@@ -125,20 +125,20 @@ static __inline__ int route4_hash_wild(void) ...@@ -125,20 +125,20 @@ static __inline__ int route4_hash_wild(void)
return 32; return 32;
} }
#define ROUTE4_APPLY_RESULT() \ #define ROUTE4_APPLY_RESULT() \
do { \ { \
*res = f->res; \ *res = f->res; \
if (tcf_exts_is_available(&f->exts)) { \ if (tcf_exts_is_available(&f->exts)) { \
int r = tcf_exts_exec(skb, &f->exts, res); \ int r = tcf_exts_exec(skb, &f->exts, res); \
if (r < 0) { \ if (r < 0) { \
dont_cache = 1; \ dont_cache = 1; \
continue; \ continue; \
} \ } \
return r; \ return r; \
} else if (!dont_cache) \ } else if (!dont_cache) \
route4_set_fastmap(head, id, iif, f); \ route4_set_fastmap(head, id, iif, f); \
return 0; \ return 0; \
} while(0) }
static int route4_classify(struct sk_buff *skb, struct tcf_proto *tp, static int route4_classify(struct sk_buff *skb, struct tcf_proto *tp,
struct tcf_result *res) struct tcf_result *res)
......
...@@ -123,14 +123,14 @@ static struct tcf_ext_map rsvp_ext_map = { ...@@ -123,14 +123,14 @@ static struct tcf_ext_map rsvp_ext_map = {
.action = TCA_RSVP_ACT .action = TCA_RSVP_ACT
}; };
#define RSVP_APPLY_RESULT() \ #define RSVP_APPLY_RESULT() \
do { \ { \
int r = tcf_exts_exec(skb, &f->exts, res); \ int r = tcf_exts_exec(skb, &f->exts, res); \
if (r < 0) \ if (r < 0) \
continue; \ continue; \
else if (r > 0) \ else if (r > 0) \
return r; \ return r; \
} while(0) }
static int rsvp_classify(struct sk_buff *skb, struct tcf_proto *tp, static int rsvp_classify(struct sk_buff *skb, struct tcf_proto *tp,
struct tcf_result *res) struct tcf_result *res)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment