diff options
Diffstat (limited to 'networking/tc.c')
-rw-r--r-- | networking/tc.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/networking/tc.c b/networking/tc.c index 4e375a066..4fa3e47bf 100644 --- a/networking/tc.c +++ b/networking/tc.c | |||
@@ -66,17 +66,21 @@ enum | |||
66 | 66 | ||
67 | /* nullifies tb on error */ | 67 | /* nullifies tb on error */ |
68 | #define __parse_rtattr_nested_compat(tb, max, rta, len) \ | 68 | #define __parse_rtattr_nested_compat(tb, max, rta, len) \ |
69 | ({if ((RTA_PAYLOAD(rta) >= len) && \ | 69 | ({ \ |
70 | (RTA_PAYLOAD(rta) >= RTA_ALIGN(len) + sizeof(struct rtattr))) { \ | 70 | if ((RTA_PAYLOAD(rta) >= len) \ |
71 | rta = RTA_DATA(rta) + RTA_ALIGN(len); \ | 71 | && (RTA_PAYLOAD(rta) >= RTA_ALIGN(len) + sizeof(struct rtattr)) \ |
72 | parse_rtattr_nested(tb, max, rta); \ | 72 | ) { \ |
73 | } else \ | 73 | rta = RTA_DATA(rta) + RTA_ALIGN(len); \ |
74 | memset(tb, 0, sizeof(struct rtattr *) * (max + 1)); \ | 74 | parse_rtattr_nested(tb, max, rta); \ |
75 | }) | 75 | } else \ |
76 | memset(tb, 0, sizeof(struct rtattr *) * (max + 1)); \ | ||
77 | }) | ||
76 | 78 | ||
77 | #define parse_rtattr_nested_compat(tb, max, rta, data, len) \ | 79 | #define parse_rtattr_nested_compat(tb, max, rta, data, len) \ |
78 | ({data = RTA_PAYLOAD(rta) >= len ? RTA_DATA(rta) : NULL; \ | 80 | ({ \ |
79 | __parse_rtattr_nested_compat(tb, max, rta, len); }) | 81 | data = RTA_PAYLOAD(rta) >= len ? RTA_DATA(rta) : NULL; \ |
82 | __parse_rtattr_nested_compat(tb, max, rta, len); \ | ||
83 | }) | ||
80 | 84 | ||
81 | #define show_details (0) /* not implemented. Does anyone need it? */ | 85 | #define show_details (0) /* not implemented. Does anyone need it? */ |
82 | #define use_iec (0) /* not currently documented in the upstream manpage */ | 86 | #define use_iec (0) /* not currently documented in the upstream manpage */ |