Skip to contentSkip to conversation

: cls_rsvp: fix tcf_exts fallout

PATCH In review Patrick McHardy 1 participant 1 message Jan 19, 2005

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/4 : cls_rsvp: fix tcf_exts fallout

# This is a BitKeeper generated diff -Nru style patch. #
# ChangeSet
# 2005/01/19 02:49:12+01:00 [email protected]
# [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: Patrick McHardy <[email protected]>
# 
# net/sched/cls_rsvp.h
#   2005/01/19 02:49:04+01:00 [email protected] +8 -8
#   [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: Patrick McHardy <[email protected]>
# 
# net/sched/cls_route.c
#   2005/01/19 02:49:04+01:00 [email protected] +14 -14
#   [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: Patrick McHardy <[email protected]>
# 
diff -Nru a/net/sched/cls_route.c b/net/sched/cls_route.c
--- a/net/sched/cls_route.c	2005-01-19 05:29:45 +01:00
+++ b/net/sched/cls_route.c	2005-01-19 05:29:45 +01:00
@@ -125,20 +125,20 @@
 	return 32;
 }

-#define ROUTE4_APPLY_RESULT() \
- do { \
- *res = f->res; \
- if (tcf_exts_is_available(&f->exts)) { \
- int r = tcf_exts_exec(skb, &f->exts, res); \
- if (r < 0) { \
- dont_cache = 1; \
- continue; \
- } \
- return r; \
- } else if (!dont_cache) \
- route4_set_fastmap(head, id, iif, f); \
- return 0; \
- } while(0)
+#define ROUTE4_APPLY_RESULT() \
+{ \
+ *res = f->res; \
+ if (tcf_exts_is_available(&f->exts)) { \
+ int r = tcf_exts_exec(skb, &f->exts, res); \
+ if (r < 0) { \
+ dont_cache = 1; \
+ continue; \
+ } \
+ return r; \
+ } else if (!dont_cache) \
+ route4_set_fastmap(head, id, iif, f); \
+ return 0; \
+}

static int route4_classify(struct sk_buff *skb, struct tcf_proto *tp,
struct tcf_result *res)

net/sched/cls_rsvp.h +8 -8
diff -Nru a/net/sched/cls_rsvp.h b/net/sched/cls_rsvp.h
@@ -123,14 +123,14 @@
 	.action = TCA_RSVP_ACT
 };
 
-#define RSVP_APPLY_RESULT()					\
-	do {							\
-		int r = tcf_exts_exec(skb, &f->exts, res);	\
-		if (r < 0)					\
-			continue;				\
-		else if (r > 0)					\
-			return r;				\
-	} while(0)
+#define RSVP_APPLY_RESULT()				\
+{							\
+	int r = tcf_exts_exec(skb, &f->exts, res);	\
+	if (r < 0)					\
+		continue;				\
+	else if (r > 0)					\
+		return r;				\
+}
 	
 static int rsvp_classify(struct sk_buff *skb, struct tcf_proto *tp,
 			 struct tcf_result *res)