diff options
-rw-r--r-- | include/linux/netfilter/nfnetlink.h | 3 | ||||
-rw-r--r-- | include/net/netfilter/nf_nat_core.h | 2 | ||||
-rw-r--r-- | net/ipv4/netfilter/nf_nat_core.c | 6 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_core.c | 2 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_netlink.c | 54 | ||||
-rw-r--r-- | net/netfilter/nfnetlink.c | 2 | ||||
-rw-r--r-- | net/netfilter/nfnetlink_log.c | 6 | ||||
-rw-r--r-- | net/netfilter/nfnetlink_queue.c | 9 | ||||
-rw-r--r-- | net/netfilter/xt_osf.c | 6 |
9 files changed, 55 insertions, 35 deletions
diff --git a/include/linux/netfilter/nfnetlink.h b/include/linux/netfilter/nfnetlink.h index bff4d5741d98..9f00da287f2c 100644 --- a/include/linux/netfilter/nfnetlink.h +++ b/include/linux/netfilter/nfnetlink.h | |||
@@ -58,7 +58,8 @@ struct nfgenmsg { | |||
58 | struct nfnl_callback | 58 | struct nfnl_callback |
59 | { | 59 | { |
60 | int (*call)(struct sock *nl, struct sk_buff *skb, | 60 | int (*call)(struct sock *nl, struct sk_buff *skb, |
61 | struct nlmsghdr *nlh, struct nlattr *cda[]); | 61 | const struct nlmsghdr *nlh, |
62 | const struct nlattr * const cda[]); | ||
62 | const struct nla_policy *policy; /* netlink attribute policy */ | 63 | const struct nla_policy *policy; /* netlink attribute policy */ |
63 | const u_int16_t attr_count; /* number of nlattr's */ | 64 | const u_int16_t attr_count; /* number of nlattr's */ |
64 | }; | 65 | }; |
diff --git a/include/net/netfilter/nf_nat_core.h b/include/net/netfilter/nf_nat_core.h index 58684066388c..33602ab66190 100644 --- a/include/net/netfilter/nf_nat_core.h +++ b/include/net/netfilter/nf_nat_core.h | |||
@@ -31,6 +31,6 @@ struct nlattr; | |||
31 | extern int | 31 | extern int |
32 | (*nfnetlink_parse_nat_setup_hook)(struct nf_conn *ct, | 32 | (*nfnetlink_parse_nat_setup_hook)(struct nf_conn *ct, |
33 | enum nf_nat_manip_type manip, | 33 | enum nf_nat_manip_type manip, |
34 | struct nlattr *attr); | 34 | const struct nlattr *attr); |
35 | 35 | ||
36 | #endif /* _NF_NAT_CORE_H */ | 36 | #endif /* _NF_NAT_CORE_H */ |
diff --git a/net/ipv4/netfilter/nf_nat_core.c b/net/ipv4/netfilter/nf_nat_core.c index b6ddd5633045..68afc6ecd343 100644 --- a/net/ipv4/netfilter/nf_nat_core.c +++ b/net/ipv4/netfilter/nf_nat_core.c | |||
@@ -620,7 +620,7 @@ static const struct nla_policy nat_nla_policy[CTA_NAT_MAX+1] = { | |||
620 | }; | 620 | }; |
621 | 621 | ||
622 | static int | 622 | static int |
623 | nfnetlink_parse_nat(struct nlattr *nat, | 623 | nfnetlink_parse_nat(const struct nlattr *nat, |
624 | const struct nf_conn *ct, struct nf_nat_range *range) | 624 | const struct nf_conn *ct, struct nf_nat_range *range) |
625 | { | 625 | { |
626 | struct nlattr *tb[CTA_NAT_MAX+1]; | 626 | struct nlattr *tb[CTA_NAT_MAX+1]; |
@@ -656,7 +656,7 @@ nfnetlink_parse_nat(struct nlattr *nat, | |||
656 | static int | 656 | static int |
657 | nfnetlink_parse_nat_setup(struct nf_conn *ct, | 657 | nfnetlink_parse_nat_setup(struct nf_conn *ct, |
658 | enum nf_nat_manip_type manip, | 658 | enum nf_nat_manip_type manip, |
659 | struct nlattr *attr) | 659 | const struct nlattr *attr) |
660 | { | 660 | { |
661 | struct nf_nat_range range; | 661 | struct nf_nat_range range; |
662 | 662 | ||
@@ -671,7 +671,7 @@ nfnetlink_parse_nat_setup(struct nf_conn *ct, | |||
671 | static int | 671 | static int |
672 | nfnetlink_parse_nat_setup(struct nf_conn *ct, | 672 | nfnetlink_parse_nat_setup(struct nf_conn *ct, |
673 | enum nf_nat_manip_type manip, | 673 | enum nf_nat_manip_type manip, |
674 | struct nlattr *attr) | 674 | const struct nlattr *attr) |
675 | { | 675 | { |
676 | return -EOPNOTSUPP; | 676 | return -EOPNOTSUPP; |
677 | } | 677 | } |
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c index b5869b9574b0..565c3a86423f 100644 --- a/net/netfilter/nf_conntrack_core.c +++ b/net/netfilter/nf_conntrack_core.c | |||
@@ -47,7 +47,7 @@ | |||
47 | 47 | ||
48 | int (*nfnetlink_parse_nat_setup_hook)(struct nf_conn *ct, | 48 | int (*nfnetlink_parse_nat_setup_hook)(struct nf_conn *ct, |
49 | enum nf_nat_manip_type manip, | 49 | enum nf_nat_manip_type manip, |
50 | struct nlattr *attr) __read_mostly; | 50 | const struct nlattr *attr) __read_mostly; |
51 | EXPORT_SYMBOL_GPL(nfnetlink_parse_nat_setup_hook); | 51 | EXPORT_SYMBOL_GPL(nfnetlink_parse_nat_setup_hook); |
52 | 52 | ||
53 | DEFINE_SPINLOCK(nf_conntrack_lock); | 53 | DEFINE_SPINLOCK(nf_conntrack_lock); |
diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c index 49479d194570..59d8064eb522 100644 --- a/net/netfilter/nf_conntrack_netlink.c +++ b/net/netfilter/nf_conntrack_netlink.c | |||
@@ -704,7 +704,8 @@ ctnetlink_parse_tuple_proto(struct nlattr *attr, | |||
704 | } | 704 | } |
705 | 705 | ||
706 | static int | 706 | static int |
707 | ctnetlink_parse_tuple(struct nlattr *cda[], struct nf_conntrack_tuple *tuple, | 707 | ctnetlink_parse_tuple(const struct nlattr * const cda[], |
708 | struct nf_conntrack_tuple *tuple, | ||
708 | enum ctattr_tuple type, u_int8_t l3num) | 709 | enum ctattr_tuple type, u_int8_t l3num) |
709 | { | 710 | { |
710 | struct nlattr *tb[CTA_TUPLE_MAX+1]; | 711 | struct nlattr *tb[CTA_TUPLE_MAX+1]; |
@@ -740,7 +741,7 @@ ctnetlink_parse_tuple(struct nlattr *cda[], struct nf_conntrack_tuple *tuple, | |||
740 | } | 741 | } |
741 | 742 | ||
742 | static inline int | 743 | static inline int |
743 | ctnetlink_parse_help(struct nlattr *attr, char **helper_name) | 744 | ctnetlink_parse_help(const struct nlattr *attr, char **helper_name) |
744 | { | 745 | { |
745 | struct nlattr *tb[CTA_HELP_MAX+1]; | 746 | struct nlattr *tb[CTA_HELP_MAX+1]; |
746 | 747 | ||
@@ -764,7 +765,8 @@ static const struct nla_policy ct_nla_policy[CTA_MAX+1] = { | |||
764 | 765 | ||
765 | static int | 766 | static int |
766 | ctnetlink_del_conntrack(struct sock *ctnl, struct sk_buff *skb, | 767 | ctnetlink_del_conntrack(struct sock *ctnl, struct sk_buff *skb, |
767 | struct nlmsghdr *nlh, struct nlattr *cda[]) | 768 | const struct nlmsghdr *nlh, |
769 | const struct nlattr * const cda[]) | ||
768 | { | 770 | { |
769 | struct nf_conntrack_tuple_hash *h; | 771 | struct nf_conntrack_tuple_hash *h; |
770 | struct nf_conntrack_tuple tuple; | 772 | struct nf_conntrack_tuple tuple; |
@@ -823,7 +825,8 @@ ctnetlink_del_conntrack(struct sock *ctnl, struct sk_buff *skb, | |||
823 | 825 | ||
824 | static int | 826 | static int |
825 | ctnetlink_get_conntrack(struct sock *ctnl, struct sk_buff *skb, | 827 | ctnetlink_get_conntrack(struct sock *ctnl, struct sk_buff *skb, |
826 | struct nlmsghdr *nlh, struct nlattr *cda[]) | 828 | const struct nlmsghdr *nlh, |
829 | const struct nlattr * const cda[]) | ||
827 | { | 830 | { |
828 | struct nf_conntrack_tuple_hash *h; | 831 | struct nf_conntrack_tuple_hash *h; |
829 | struct nf_conntrack_tuple tuple; | 832 | struct nf_conntrack_tuple tuple; |
@@ -884,7 +887,7 @@ out: | |||
884 | static int | 887 | static int |
885 | ctnetlink_parse_nat_setup(struct nf_conn *ct, | 888 | ctnetlink_parse_nat_setup(struct nf_conn *ct, |
886 | enum nf_nat_manip_type manip, | 889 | enum nf_nat_manip_type manip, |
887 | struct nlattr *attr) | 890 | const struct nlattr *attr) |
888 | { | 891 | { |
889 | typeof(nfnetlink_parse_nat_setup_hook) parse_nat_setup; | 892 | typeof(nfnetlink_parse_nat_setup_hook) parse_nat_setup; |
890 | 893 | ||
@@ -914,7 +917,7 @@ ctnetlink_parse_nat_setup(struct nf_conn *ct, | |||
914 | #endif | 917 | #endif |
915 | 918 | ||
916 | static int | 919 | static int |
917 | ctnetlink_change_status(struct nf_conn *ct, struct nlattr *cda[]) | 920 | ctnetlink_change_status(struct nf_conn *ct, const struct nlattr * const cda[]) |
918 | { | 921 | { |
919 | unsigned long d; | 922 | unsigned long d; |
920 | unsigned int status = ntohl(nla_get_be32(cda[CTA_STATUS])); | 923 | unsigned int status = ntohl(nla_get_be32(cda[CTA_STATUS])); |
@@ -940,7 +943,7 @@ ctnetlink_change_status(struct nf_conn *ct, struct nlattr *cda[]) | |||
940 | } | 943 | } |
941 | 944 | ||
942 | static int | 945 | static int |
943 | ctnetlink_change_nat(struct nf_conn *ct, struct nlattr *cda[]) | 946 | ctnetlink_change_nat(struct nf_conn *ct, const struct nlattr * const cda[]) |
944 | { | 947 | { |
945 | #ifdef CONFIG_NF_NAT_NEEDED | 948 | #ifdef CONFIG_NF_NAT_NEEDED |
946 | int ret; | 949 | int ret; |
@@ -966,7 +969,7 @@ ctnetlink_change_nat(struct nf_conn *ct, struct nlattr *cda[]) | |||
966 | } | 969 | } |
967 | 970 | ||
968 | static inline int | 971 | static inline int |
969 | ctnetlink_change_helper(struct nf_conn *ct, struct nlattr *cda[]) | 972 | ctnetlink_change_helper(struct nf_conn *ct, const struct nlattr * const cda[]) |
970 | { | 973 | { |
971 | struct nf_conntrack_helper *helper; | 974 | struct nf_conntrack_helper *helper; |
972 | struct nf_conn_help *help = nfct_help(ct); | 975 | struct nf_conn_help *help = nfct_help(ct); |
@@ -1028,7 +1031,7 @@ ctnetlink_change_helper(struct nf_conn *ct, struct nlattr *cda[]) | |||
1028 | } | 1031 | } |
1029 | 1032 | ||
1030 | static inline int | 1033 | static inline int |
1031 | ctnetlink_change_timeout(struct nf_conn *ct, struct nlattr *cda[]) | 1034 | ctnetlink_change_timeout(struct nf_conn *ct, const struct nlattr * const cda[]) |
1032 | { | 1035 | { |
1033 | u_int32_t timeout = ntohl(nla_get_be32(cda[CTA_TIMEOUT])); | 1036 | u_int32_t timeout = ntohl(nla_get_be32(cda[CTA_TIMEOUT])); |
1034 | 1037 | ||
@@ -1042,9 +1045,10 @@ ctnetlink_change_timeout(struct nf_conn *ct, struct nlattr *cda[]) | |||
1042 | } | 1045 | } |
1043 | 1046 | ||
1044 | static inline int | 1047 | static inline int |
1045 | ctnetlink_change_protoinfo(struct nf_conn *ct, struct nlattr *cda[]) | 1048 | ctnetlink_change_protoinfo(struct nf_conn *ct, const struct nlattr * const cda[]) |
1046 | { | 1049 | { |
1047 | struct nlattr *tb[CTA_PROTOINFO_MAX+1], *attr = cda[CTA_PROTOINFO]; | 1050 | const struct nlattr *attr = cda[CTA_PROTOINFO]; |
1051 | struct nlattr *tb[CTA_PROTOINFO_MAX+1]; | ||
1048 | struct nf_conntrack_l4proto *l4proto; | 1052 | struct nf_conntrack_l4proto *l4proto; |
1049 | int err = 0; | 1053 | int err = 0; |
1050 | 1054 | ||
@@ -1061,7 +1065,7 @@ ctnetlink_change_protoinfo(struct nf_conn *ct, struct nlattr *cda[]) | |||
1061 | 1065 | ||
1062 | #ifdef CONFIG_NF_NAT_NEEDED | 1066 | #ifdef CONFIG_NF_NAT_NEEDED |
1063 | static inline int | 1067 | static inline int |
1064 | change_nat_seq_adj(struct nf_nat_seq *natseq, struct nlattr *attr) | 1068 | change_nat_seq_adj(struct nf_nat_seq *natseq, const struct nlattr * const attr) |
1065 | { | 1069 | { |
1066 | struct nlattr *cda[CTA_NAT_SEQ_MAX+1]; | 1070 | struct nlattr *cda[CTA_NAT_SEQ_MAX+1]; |
1067 | 1071 | ||
@@ -1089,7 +1093,8 @@ change_nat_seq_adj(struct nf_nat_seq *natseq, struct nlattr *attr) | |||
1089 | } | 1093 | } |
1090 | 1094 | ||
1091 | static int | 1095 | static int |
1092 | ctnetlink_change_nat_seq_adj(struct nf_conn *ct, struct nlattr *cda[]) | 1096 | ctnetlink_change_nat_seq_adj(struct nf_conn *ct, |
1097 | const struct nlattr * const cda[]) | ||
1093 | { | 1098 | { |
1094 | int ret = 0; | 1099 | int ret = 0; |
1095 | struct nf_conn_nat *nat = nfct_nat(ct); | 1100 | struct nf_conn_nat *nat = nfct_nat(ct); |
@@ -1120,7 +1125,8 @@ ctnetlink_change_nat_seq_adj(struct nf_conn *ct, struct nlattr *cda[]) | |||
1120 | #endif | 1125 | #endif |
1121 | 1126 | ||
1122 | static int | 1127 | static int |
1123 | ctnetlink_change_conntrack(struct nf_conn *ct, struct nlattr *cda[]) | 1128 | ctnetlink_change_conntrack(struct nf_conn *ct, |
1129 | const struct nlattr * const cda[]) | ||
1124 | { | 1130 | { |
1125 | int err; | 1131 | int err; |
1126 | 1132 | ||
@@ -1169,7 +1175,7 @@ ctnetlink_change_conntrack(struct nf_conn *ct, struct nlattr *cda[]) | |||
1169 | } | 1175 | } |
1170 | 1176 | ||
1171 | static struct nf_conn * | 1177 | static struct nf_conn * |
1172 | ctnetlink_create_conntrack(struct nlattr *cda[], | 1178 | ctnetlink_create_conntrack(const struct nlattr * const cda[], |
1173 | struct nf_conntrack_tuple *otuple, | 1179 | struct nf_conntrack_tuple *otuple, |
1174 | struct nf_conntrack_tuple *rtuple, | 1180 | struct nf_conntrack_tuple *rtuple, |
1175 | u8 u3) | 1181 | u8 u3) |
@@ -1304,7 +1310,8 @@ err1: | |||
1304 | 1310 | ||
1305 | static int | 1311 | static int |
1306 | ctnetlink_new_conntrack(struct sock *ctnl, struct sk_buff *skb, | 1312 | ctnetlink_new_conntrack(struct sock *ctnl, struct sk_buff *skb, |
1307 | struct nlmsghdr *nlh, struct nlattr *cda[]) | 1313 | const struct nlmsghdr *nlh, |
1314 | const struct nlattr * const cda[]) | ||
1308 | { | 1315 | { |
1309 | struct nf_conntrack_tuple otuple, rtuple; | 1316 | struct nf_conntrack_tuple otuple, rtuple; |
1310 | struct nf_conntrack_tuple_hash *h = NULL; | 1317 | struct nf_conntrack_tuple_hash *h = NULL; |
@@ -1629,7 +1636,8 @@ static const struct nla_policy exp_nla_policy[CTA_EXPECT_MAX+1] = { | |||
1629 | 1636 | ||
1630 | static int | 1637 | static int |
1631 | ctnetlink_get_expect(struct sock *ctnl, struct sk_buff *skb, | 1638 | ctnetlink_get_expect(struct sock *ctnl, struct sk_buff *skb, |
1632 | struct nlmsghdr *nlh, struct nlattr *cda[]) | 1639 | const struct nlmsghdr *nlh, |
1640 | const struct nlattr * const cda[]) | ||
1633 | { | 1641 | { |
1634 | struct nf_conntrack_tuple tuple; | 1642 | struct nf_conntrack_tuple tuple; |
1635 | struct nf_conntrack_expect *exp; | 1643 | struct nf_conntrack_expect *exp; |
@@ -1689,7 +1697,8 @@ out: | |||
1689 | 1697 | ||
1690 | static int | 1698 | static int |
1691 | ctnetlink_del_expect(struct sock *ctnl, struct sk_buff *skb, | 1699 | ctnetlink_del_expect(struct sock *ctnl, struct sk_buff *skb, |
1692 | struct nlmsghdr *nlh, struct nlattr *cda[]) | 1700 | const struct nlmsghdr *nlh, |
1701 | const struct nlattr * const cda[]) | ||
1693 | { | 1702 | { |
1694 | struct nf_conntrack_expect *exp; | 1703 | struct nf_conntrack_expect *exp; |
1695 | struct nf_conntrack_tuple tuple; | 1704 | struct nf_conntrack_tuple tuple; |
@@ -1767,13 +1776,15 @@ ctnetlink_del_expect(struct sock *ctnl, struct sk_buff *skb, | |||
1767 | return 0; | 1776 | return 0; |
1768 | } | 1777 | } |
1769 | static int | 1778 | static int |
1770 | ctnetlink_change_expect(struct nf_conntrack_expect *x, struct nlattr *cda[]) | 1779 | ctnetlink_change_expect(struct nf_conntrack_expect *x, |
1780 | const struct nlattr * const cda[]) | ||
1771 | { | 1781 | { |
1772 | return -EOPNOTSUPP; | 1782 | return -EOPNOTSUPP; |
1773 | } | 1783 | } |
1774 | 1784 | ||
1775 | static int | 1785 | static int |
1776 | ctnetlink_create_expect(struct nlattr *cda[], u_int8_t u3, u32 pid, int report) | 1786 | ctnetlink_create_expect(const struct nlattr * const cda[], u_int8_t u3, |
1787 | u32 pid, int report) | ||
1777 | { | 1788 | { |
1778 | struct nf_conntrack_tuple tuple, mask, master_tuple; | 1789 | struct nf_conntrack_tuple tuple, mask, master_tuple; |
1779 | struct nf_conntrack_tuple_hash *h = NULL; | 1790 | struct nf_conntrack_tuple_hash *h = NULL; |
@@ -1831,7 +1842,8 @@ out: | |||
1831 | 1842 | ||
1832 | static int | 1843 | static int |
1833 | ctnetlink_new_expect(struct sock *ctnl, struct sk_buff *skb, | 1844 | ctnetlink_new_expect(struct sock *ctnl, struct sk_buff *skb, |
1834 | struct nlmsghdr *nlh, struct nlattr *cda[]) | 1845 | const struct nlmsghdr *nlh, |
1846 | const struct nlattr * const cda[]) | ||
1835 | { | 1847 | { |
1836 | struct nf_conntrack_tuple tuple; | 1848 | struct nf_conntrack_tuple tuple; |
1837 | struct nf_conntrack_expect *exp; | 1849 | struct nf_conntrack_expect *exp; |
diff --git a/net/netfilter/nfnetlink.c b/net/netfilter/nfnetlink.c index 92761a988375..eedc0c1ac7a4 100644 --- a/net/netfilter/nfnetlink.c +++ b/net/netfilter/nfnetlink.c | |||
@@ -170,7 +170,7 @@ replay: | |||
170 | if (err < 0) | 170 | if (err < 0) |
171 | return err; | 171 | return err; |
172 | 172 | ||
173 | err = nc->call(nfnl, skb, nlh, cda); | 173 | err = nc->call(nfnl, skb, nlh, (const struct nlattr **)cda); |
174 | if (err == -EAGAIN) | 174 | if (err == -EAGAIN) |
175 | goto replay; | 175 | goto replay; |
176 | return err; | 176 | return err; |
diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c index 66a6dd5c519a..f900dc3194af 100644 --- a/net/netfilter/nfnetlink_log.c +++ b/net/netfilter/nfnetlink_log.c | |||
@@ -694,7 +694,8 @@ static struct notifier_block nfulnl_rtnl_notifier = { | |||
694 | 694 | ||
695 | static int | 695 | static int |
696 | nfulnl_recv_unsupp(struct sock *ctnl, struct sk_buff *skb, | 696 | nfulnl_recv_unsupp(struct sock *ctnl, struct sk_buff *skb, |
697 | struct nlmsghdr *nlh, struct nlattr *nfqa[]) | 697 | const struct nlmsghdr *nlh, |
698 | const struct nlattr * const nfqa[]) | ||
698 | { | 699 | { |
699 | return -ENOTSUPP; | 700 | return -ENOTSUPP; |
700 | } | 701 | } |
@@ -716,7 +717,8 @@ static const struct nla_policy nfula_cfg_policy[NFULA_CFG_MAX+1] = { | |||
716 | 717 | ||
717 | static int | 718 | static int |
718 | nfulnl_recv_config(struct sock *ctnl, struct sk_buff *skb, | 719 | nfulnl_recv_config(struct sock *ctnl, struct sk_buff *skb, |
719 | struct nlmsghdr *nlh, struct nlattr *nfula[]) | 720 | const struct nlmsghdr *nlh, |
721 | const struct nlattr * const nfula[]) | ||
720 | { | 722 | { |
721 | struct nfgenmsg *nfmsg = NLMSG_DATA(nlh); | 723 | struct nfgenmsg *nfmsg = NLMSG_DATA(nlh); |
722 | u_int16_t group_num = ntohs(nfmsg->res_id); | 724 | u_int16_t group_num = ntohs(nfmsg->res_id); |
diff --git a/net/netfilter/nfnetlink_queue.c b/net/netfilter/nfnetlink_queue.c index 71daa0934b6c..7a9dec9fb822 100644 --- a/net/netfilter/nfnetlink_queue.c +++ b/net/netfilter/nfnetlink_queue.c | |||
@@ -608,7 +608,8 @@ static const struct nla_policy nfqa_verdict_policy[NFQA_MAX+1] = { | |||
608 | 608 | ||
609 | static int | 609 | static int |
610 | nfqnl_recv_verdict(struct sock *ctnl, struct sk_buff *skb, | 610 | nfqnl_recv_verdict(struct sock *ctnl, struct sk_buff *skb, |
611 | struct nlmsghdr *nlh, struct nlattr *nfqa[]) | 611 | const struct nlmsghdr *nlh, |
612 | const struct nlattr * const nfqa[]) | ||
612 | { | 613 | { |
613 | struct nfgenmsg *nfmsg = NLMSG_DATA(nlh); | 614 | struct nfgenmsg *nfmsg = NLMSG_DATA(nlh); |
614 | u_int16_t queue_num = ntohs(nfmsg->res_id); | 615 | u_int16_t queue_num = ntohs(nfmsg->res_id); |
@@ -670,7 +671,8 @@ err_out_unlock: | |||
670 | 671 | ||
671 | static int | 672 | static int |
672 | nfqnl_recv_unsupp(struct sock *ctnl, struct sk_buff *skb, | 673 | nfqnl_recv_unsupp(struct sock *ctnl, struct sk_buff *skb, |
673 | struct nlmsghdr *nlh, struct nlattr *nfqa[]) | 674 | const struct nlmsghdr *nlh, |
675 | const struct nlattr * const nfqa[]) | ||
674 | { | 676 | { |
675 | return -ENOTSUPP; | 677 | return -ENOTSUPP; |
676 | } | 678 | } |
@@ -687,7 +689,8 @@ static const struct nf_queue_handler nfqh = { | |||
687 | 689 | ||
688 | static int | 690 | static int |
689 | nfqnl_recv_config(struct sock *ctnl, struct sk_buff *skb, | 691 | nfqnl_recv_config(struct sock *ctnl, struct sk_buff *skb, |
690 | struct nlmsghdr *nlh, struct nlattr *nfqa[]) | 692 | const struct nlmsghdr *nlh, |
693 | const struct nlattr * const nfqa[]) | ||
691 | { | 694 | { |
692 | struct nfgenmsg *nfmsg = NLMSG_DATA(nlh); | 695 | struct nfgenmsg *nfmsg = NLMSG_DATA(nlh); |
693 | u_int16_t queue_num = ntohs(nfmsg->res_id); | 696 | u_int16_t queue_num = ntohs(nfmsg->res_id); |
diff --git a/net/netfilter/xt_osf.c b/net/netfilter/xt_osf.c index 0f482e2440b4..63e190504656 100644 --- a/net/netfilter/xt_osf.c +++ b/net/netfilter/xt_osf.c | |||
@@ -70,7 +70,8 @@ static void xt_osf_finger_free_rcu(struct rcu_head *rcu_head) | |||
70 | } | 70 | } |
71 | 71 | ||
72 | static int xt_osf_add_callback(struct sock *ctnl, struct sk_buff *skb, | 72 | static int xt_osf_add_callback(struct sock *ctnl, struct sk_buff *skb, |
73 | struct nlmsghdr *nlh, struct nlattr *osf_attrs[]) | 73 | const struct nlmsghdr *nlh, |
74 | const struct nlattr * const osf_attrs[]) | ||
74 | { | 75 | { |
75 | struct xt_osf_user_finger *f; | 76 | struct xt_osf_user_finger *f; |
76 | struct xt_osf_finger *kf = NULL, *sf; | 77 | struct xt_osf_finger *kf = NULL, *sf; |
@@ -112,7 +113,8 @@ static int xt_osf_add_callback(struct sock *ctnl, struct sk_buff *skb, | |||
112 | } | 113 | } |
113 | 114 | ||
114 | static int xt_osf_remove_callback(struct sock *ctnl, struct sk_buff *skb, | 115 | static int xt_osf_remove_callback(struct sock *ctnl, struct sk_buff *skb, |
115 | struct nlmsghdr *nlh, struct nlattr *osf_attrs[]) | 116 | const struct nlmsghdr *nlh, |
117 | const struct nlattr * const osf_attrs[]) | ||
116 | { | 118 | { |
117 | struct xt_osf_user_finger *f; | 119 | struct xt_osf_user_finger *f; |
118 | struct xt_osf_finger *sf; | 120 | struct xt_osf_finger *sf; |