aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/netfilter/x_tables.h8
-rw-r--r--net/ipv4/netfilter/ip_tables.c10
-rw-r--r--net/ipv6/netfilter/ip6_tables.c10
-rw-r--r--net/netfilter/x_tables.c8
4 files changed, 20 insertions, 16 deletions
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h
index 91a1dd5b9c66..11eea39bbf7d 100644
--- a/include/linux/netfilter/x_tables.h
+++ b/include/linux/netfilter/x_tables.h
@@ -432,15 +432,15 @@ extern short xt_compat_calc_jump(int af, unsigned int offset);
432 432
433extern int xt_compat_match_offset(struct xt_match *match); 433extern int xt_compat_match_offset(struct xt_match *match);
434extern int xt_compat_match_from_user(struct xt_entry_match *m, 434extern int xt_compat_match_from_user(struct xt_entry_match *m,
435 void **dstptr, int *size); 435 void **dstptr, unsigned int *size);
436extern int xt_compat_match_to_user(struct xt_entry_match *m, 436extern int xt_compat_match_to_user(struct xt_entry_match *m,
437 void __user **dstptr, int *size); 437 void __user **dstptr, unsigned int *size);
438 438
439extern int xt_compat_target_offset(struct xt_target *target); 439extern int xt_compat_target_offset(struct xt_target *target);
440extern void xt_compat_target_from_user(struct xt_entry_target *t, 440extern void xt_compat_target_from_user(struct xt_entry_target *t,
441 void **dstptr, int *size); 441 void **dstptr, unsigned int *size);
442extern int xt_compat_target_to_user(struct xt_entry_target *t, 442extern int xt_compat_target_to_user(struct xt_entry_target *t,
443 void __user **dstptr, int *size); 443 void __user **dstptr, unsigned int *size);
444 444
445#endif /* CONFIG_COMPAT */ 445#endif /* CONFIG_COMPAT */
446#endif /* __KERNEL__ */ 446#endif /* __KERNEL__ */
diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c
index 427bc9b3d342..a73afa1ba8b8 100644
--- a/net/ipv4/netfilter/ip_tables.c
+++ b/net/ipv4/netfilter/ip_tables.c
@@ -1429,7 +1429,7 @@ struct compat_ipt_replace {
1429 1429
1430static int 1430static int
1431compat_copy_entry_to_user(struct ipt_entry *e, void __user **dstptr, 1431compat_copy_entry_to_user(struct ipt_entry *e, void __user **dstptr,
1432 compat_uint_t *size, struct xt_counters *counters, 1432 unsigned int *size, struct xt_counters *counters,
1433 unsigned int *i) 1433 unsigned int *i)
1434{ 1434{
1435 struct ipt_entry_target *t; 1435 struct ipt_entry_target *t;
@@ -1476,7 +1476,7 @@ compat_find_calc_match(struct ipt_entry_match *m,
1476 const char *name, 1476 const char *name,
1477 const struct ipt_ip *ip, 1477 const struct ipt_ip *ip,
1478 unsigned int hookmask, 1478 unsigned int hookmask,
1479 int *size, int *i) 1479 int *size, unsigned int *i)
1480{ 1480{
1481 struct xt_match *match; 1481 struct xt_match *match;
1482 1482
@@ -1534,7 +1534,8 @@ check_compat_entry_size_and_hooks(struct compat_ipt_entry *e,
1534 struct ipt_entry_target *t; 1534 struct ipt_entry_target *t;
1535 struct xt_target *target; 1535 struct xt_target *target;
1536 unsigned int entry_offset; 1536 unsigned int entry_offset;
1537 int ret, off, h, j; 1537 unsigned int j;
1538 int ret, off, h;
1538 1539
1539 duprintf("check_compat_entry_size_and_hooks %p\n", e); 1540 duprintf("check_compat_entry_size_and_hooks %p\n", e);
1540 if ((unsigned long)e % __alignof__(struct compat_ipt_entry) != 0 1541 if ((unsigned long)e % __alignof__(struct compat_ipt_entry) != 0
@@ -1647,7 +1648,8 @@ static int
1647compat_check_entry(struct ipt_entry *e, const char *name, 1648compat_check_entry(struct ipt_entry *e, const char *name,
1648 unsigned int *i) 1649 unsigned int *i)
1649{ 1650{
1650 int j, ret; 1651 unsigned int j;
1652 int ret;
1651 1653
1652 j = 0; 1654 j = 0;
1653 ret = IPT_MATCH_ITERATE(e, check_match, name, &e->ip, 1655 ret = IPT_MATCH_ITERATE(e, check_match, name, &e->ip,
diff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c
index 6fabb73ff445..b91738ab9f4e 100644
--- a/net/ipv6/netfilter/ip6_tables.c
+++ b/net/ipv6/netfilter/ip6_tables.c
@@ -1457,7 +1457,7 @@ struct compat_ip6t_replace {
1457 1457
1458static int 1458static int
1459compat_copy_entry_to_user(struct ip6t_entry *e, void __user **dstptr, 1459compat_copy_entry_to_user(struct ip6t_entry *e, void __user **dstptr,
1460 compat_uint_t *size, struct xt_counters *counters, 1460 unsigned int *size, struct xt_counters *counters,
1461 unsigned int *i) 1461 unsigned int *i)
1462{ 1462{
1463 struct ip6t_entry_target *t; 1463 struct ip6t_entry_target *t;
@@ -1504,7 +1504,7 @@ compat_find_calc_match(struct ip6t_entry_match *m,
1504 const char *name, 1504 const char *name,
1505 const struct ip6t_ip6 *ipv6, 1505 const struct ip6t_ip6 *ipv6,
1506 unsigned int hookmask, 1506 unsigned int hookmask,
1507 int *size, int *i) 1507 int *size, unsigned int *i)
1508{ 1508{
1509 struct xt_match *match; 1509 struct xt_match *match;
1510 1510
@@ -1562,7 +1562,8 @@ check_compat_entry_size_and_hooks(struct compat_ip6t_entry *e,
1562 struct ip6t_entry_target *t; 1562 struct ip6t_entry_target *t;
1563 struct xt_target *target; 1563 struct xt_target *target;
1564 unsigned int entry_offset; 1564 unsigned int entry_offset;
1565 int ret, off, h, j; 1565 unsigned int j;
1566 int ret, off, h;
1566 1567
1567 duprintf("check_compat_entry_size_and_hooks %p\n", e); 1568 duprintf("check_compat_entry_size_and_hooks %p\n", e);
1568 if ((unsigned long)e % __alignof__(struct compat_ip6t_entry) != 0 1569 if ((unsigned long)e % __alignof__(struct compat_ip6t_entry) != 0
@@ -1674,7 +1675,8 @@ compat_copy_entry_from_user(struct compat_ip6t_entry *e, void **dstptr,
1674static int compat_check_entry(struct ip6t_entry *e, const char *name, 1675static int compat_check_entry(struct ip6t_entry *e, const char *name,
1675 unsigned int *i) 1676 unsigned int *i)
1676{ 1677{
1677 int j, ret; 1678 unsigned int j;
1679 int ret;
1678 1680
1679 j = 0; 1681 j = 0;
1680 ret = IP6T_MATCH_ITERATE(e, check_match, name, &e->ipv6, 1682 ret = IP6T_MATCH_ITERATE(e, check_match, name, &e->ipv6,
diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c
index d7fbb1bb92ea..cd78fc853a5d 100644
--- a/net/netfilter/x_tables.c
+++ b/net/netfilter/x_tables.c
@@ -399,7 +399,7 @@ int xt_compat_match_offset(struct xt_match *match)
399EXPORT_SYMBOL_GPL(xt_compat_match_offset); 399EXPORT_SYMBOL_GPL(xt_compat_match_offset);
400 400
401int xt_compat_match_from_user(struct xt_entry_match *m, void **dstptr, 401int xt_compat_match_from_user(struct xt_entry_match *m, void **dstptr,
402 int *size) 402 unsigned int *size)
403{ 403{
404 struct xt_match *match = m->u.kernel.match; 404 struct xt_match *match = m->u.kernel.match;
405 struct compat_xt_entry_match *cm = (struct compat_xt_entry_match *)m; 405 struct compat_xt_entry_match *cm = (struct compat_xt_entry_match *)m;
@@ -426,7 +426,7 @@ int xt_compat_match_from_user(struct xt_entry_match *m, void **dstptr,
426EXPORT_SYMBOL_GPL(xt_compat_match_from_user); 426EXPORT_SYMBOL_GPL(xt_compat_match_from_user);
427 427
428int xt_compat_match_to_user(struct xt_entry_match *m, void __user **dstptr, 428int xt_compat_match_to_user(struct xt_entry_match *m, void __user **dstptr,
429 int *size) 429 unsigned int *size)
430{ 430{
431 struct xt_match *match = m->u.kernel.match; 431 struct xt_match *match = m->u.kernel.match;
432 struct compat_xt_entry_match __user *cm = *dstptr; 432 struct compat_xt_entry_match __user *cm = *dstptr;
@@ -493,7 +493,7 @@ int xt_compat_target_offset(struct xt_target *target)
493EXPORT_SYMBOL_GPL(xt_compat_target_offset); 493EXPORT_SYMBOL_GPL(xt_compat_target_offset);
494 494
495void xt_compat_target_from_user(struct xt_entry_target *t, void **dstptr, 495void xt_compat_target_from_user(struct xt_entry_target *t, void **dstptr,
496 int *size) 496 unsigned int *size)
497{ 497{
498 struct xt_target *target = t->u.kernel.target; 498 struct xt_target *target = t->u.kernel.target;
499 struct compat_xt_entry_target *ct = (struct compat_xt_entry_target *)t; 499 struct compat_xt_entry_target *ct = (struct compat_xt_entry_target *)t;
@@ -519,7 +519,7 @@ void xt_compat_target_from_user(struct xt_entry_target *t, void **dstptr,
519EXPORT_SYMBOL_GPL(xt_compat_target_from_user); 519EXPORT_SYMBOL_GPL(xt_compat_target_from_user);
520 520
521int xt_compat_target_to_user(struct xt_entry_target *t, void __user **dstptr, 521int xt_compat_target_to_user(struct xt_entry_target *t, void __user **dstptr,
522 int *size) 522 unsigned int *size)
523{ 523{
524 struct xt_target *target = t->u.kernel.target; 524 struct xt_target *target = t->u.kernel.target;
525 struct compat_xt_entry_target __user *ct = *dstptr; 525 struct compat_xt_entry_target __user *ct = *dstptr;