diff options
author | Jan Engelhardt <jengelh@medozas.de> | 2009-06-26 02:23:19 -0400 |
---|---|---|
committer | Jan Engelhardt <jengelh@medozas.de> | 2010-02-15 10:59:28 -0500 |
commit | 739674fb7febf116e7d647031fab16989a08a965 (patch) | |
tree | b2b0bcde6aa93dfc7a9811da7805affcef225a2a /net/netfilter | |
parent | b402405d71beed8e4df354844353f66b4e18269f (diff) |
netfilter: xtables: constify args in compat copying functions
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Diffstat (limited to 'net/netfilter')
-rw-r--r-- | net/netfilter/x_tables.c | 8 | ||||
-rw-r--r-- | net/netfilter/xt_hashlimit.c | 4 | ||||
-rw-r--r-- | net/netfilter/xt_limit.c | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c index 12503199826f..69c56287d518 100644 --- a/net/netfilter/x_tables.c +++ b/net/netfilter/x_tables.c | |||
@@ -485,8 +485,8 @@ int xt_compat_match_from_user(struct xt_entry_match *m, void **dstptr, | |||
485 | } | 485 | } |
486 | EXPORT_SYMBOL_GPL(xt_compat_match_from_user); | 486 | EXPORT_SYMBOL_GPL(xt_compat_match_from_user); |
487 | 487 | ||
488 | int xt_compat_match_to_user(struct xt_entry_match *m, void __user **dstptr, | 488 | int xt_compat_match_to_user(const struct xt_entry_match *m, |
489 | unsigned int *size) | 489 | void __user **dstptr, unsigned int *size) |
490 | { | 490 | { |
491 | const struct xt_match *match = m->u.kernel.match; | 491 | const struct xt_match *match = m->u.kernel.match; |
492 | struct compat_xt_entry_match __user *cm = *dstptr; | 492 | struct compat_xt_entry_match __user *cm = *dstptr; |
@@ -588,8 +588,8 @@ void xt_compat_target_from_user(struct xt_entry_target *t, void **dstptr, | |||
588 | } | 588 | } |
589 | EXPORT_SYMBOL_GPL(xt_compat_target_from_user); | 589 | EXPORT_SYMBOL_GPL(xt_compat_target_from_user); |
590 | 590 | ||
591 | int xt_compat_target_to_user(struct xt_entry_target *t, void __user **dstptr, | 591 | int xt_compat_target_to_user(const struct xt_entry_target *t, |
592 | unsigned int *size) | 592 | void __user **dstptr, unsigned int *size) |
593 | { | 593 | { |
594 | const struct xt_target *target = t->u.kernel.target; | 594 | const struct xt_target *target = t->u.kernel.target; |
595 | struct compat_xt_entry_target __user *ct = *dstptr; | 595 | struct compat_xt_entry_target __user *ct = *dstptr; |
diff --git a/net/netfilter/xt_hashlimit.c b/net/netfilter/xt_hashlimit.c index 017c95966aa8..e47fb805ffb4 100644 --- a/net/netfilter/xt_hashlimit.c +++ b/net/netfilter/xt_hashlimit.c | |||
@@ -775,7 +775,7 @@ struct compat_xt_hashlimit_info { | |||
775 | compat_uptr_t master; | 775 | compat_uptr_t master; |
776 | }; | 776 | }; |
777 | 777 | ||
778 | static void hashlimit_mt_compat_from_user(void *dst, void *src) | 778 | static void hashlimit_mt_compat_from_user(void *dst, const void *src) |
779 | { | 779 | { |
780 | int off = offsetof(struct compat_xt_hashlimit_info, hinfo); | 780 | int off = offsetof(struct compat_xt_hashlimit_info, hinfo); |
781 | 781 | ||
@@ -783,7 +783,7 @@ static void hashlimit_mt_compat_from_user(void *dst, void *src) | |||
783 | memset(dst + off, 0, sizeof(struct compat_xt_hashlimit_info) - off); | 783 | memset(dst + off, 0, sizeof(struct compat_xt_hashlimit_info) - off); |
784 | } | 784 | } |
785 | 785 | ||
786 | static int hashlimit_mt_compat_to_user(void __user *dst, void *src) | 786 | static int hashlimit_mt_compat_to_user(void __user *dst, const void *src) |
787 | { | 787 | { |
788 | int off = offsetof(struct compat_xt_hashlimit_info, hinfo); | 788 | int off = offsetof(struct compat_xt_hashlimit_info, hinfo); |
789 | 789 | ||
diff --git a/net/netfilter/xt_limit.c b/net/netfilter/xt_limit.c index 2773be6a71dd..a0ca5339af41 100644 --- a/net/netfilter/xt_limit.c +++ b/net/netfilter/xt_limit.c | |||
@@ -148,7 +148,7 @@ struct compat_xt_rateinfo { | |||
148 | 148 | ||
149 | /* To keep the full "prev" timestamp, the upper 32 bits are stored in the | 149 | /* To keep the full "prev" timestamp, the upper 32 bits are stored in the |
150 | * master pointer, which does not need to be preserved. */ | 150 | * master pointer, which does not need to be preserved. */ |
151 | static void limit_mt_compat_from_user(void *dst, void *src) | 151 | static void limit_mt_compat_from_user(void *dst, const void *src) |
152 | { | 152 | { |
153 | const struct compat_xt_rateinfo *cm = src; | 153 | const struct compat_xt_rateinfo *cm = src; |
154 | struct xt_rateinfo m = { | 154 | struct xt_rateinfo m = { |
@@ -162,7 +162,7 @@ static void limit_mt_compat_from_user(void *dst, void *src) | |||
162 | memcpy(dst, &m, sizeof(m)); | 162 | memcpy(dst, &m, sizeof(m)); |
163 | } | 163 | } |
164 | 164 | ||
165 | static int limit_mt_compat_to_user(void __user *dst, void *src) | 165 | static int limit_mt_compat_to_user(void __user *dst, const void *src) |
166 | { | 166 | { |
167 | const struct xt_rateinfo *m = src; | 167 | const struct xt_rateinfo *m = src; |
168 | struct compat_xt_rateinfo cm = { | 168 | struct compat_xt_rateinfo cm = { |