diff options
-rw-r--r-- | net/bridge/netfilter/ebt_limit.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/net/bridge/netfilter/ebt_limit.c b/net/bridge/netfilter/ebt_limit.c index 9dd16e6b10e7..7a8182710eb3 100644 --- a/net/bridge/netfilter/ebt_limit.c +++ b/net/bridge/netfilter/ebt_limit.c | |||
@@ -84,6 +84,19 @@ static bool ebt_limit_mt_check(const struct xt_mtchk_param *par) | |||
84 | return true; | 84 | return true; |
85 | } | 85 | } |
86 | 86 | ||
87 | |||
88 | #ifdef CONFIG_COMPAT | ||
89 | /* | ||
90 | * no conversion function needed -- | ||
91 | * only avg/burst have meaningful values in userspace. | ||
92 | */ | ||
93 | struct ebt_compat_limit_info { | ||
94 | compat_uint_t avg, burst; | ||
95 | compat_ulong_t prev; | ||
96 | compat_uint_t credit, credit_cap, cost; | ||
97 | }; | ||
98 | #endif | ||
99 | |||
87 | static struct xt_match ebt_limit_mt_reg __read_mostly = { | 100 | static struct xt_match ebt_limit_mt_reg __read_mostly = { |
88 | .name = "limit", | 101 | .name = "limit", |
89 | .revision = 0, | 102 | .revision = 0, |
@@ -91,6 +104,9 @@ static struct xt_match ebt_limit_mt_reg __read_mostly = { | |||
91 | .match = ebt_limit_mt, | 104 | .match = ebt_limit_mt, |
92 | .checkentry = ebt_limit_mt_check, | 105 | .checkentry = ebt_limit_mt_check, |
93 | .matchsize = sizeof(struct ebt_limit_info), | 106 | .matchsize = sizeof(struct ebt_limit_info), |
107 | #ifdef CONFIG_COMPAT | ||
108 | .compatsize = sizeof(struct ebt_compat_limit_info), | ||
109 | #endif | ||
94 | .me = THIS_MODULE, | 110 | .me = THIS_MODULE, |
95 | }; | 111 | }; |
96 | 112 | ||