diff options
Diffstat (limited to 'net')
74 files changed, 225 insertions, 223 deletions
diff --git a/net/bridge/netfilter/ebt_log.c b/net/bridge/netfilter/ebt_log.c index 3770cd8a7b3a..8b17c64bcd75 100644 --- a/net/bridge/netfilter/ebt_log.c +++ b/net/bridge/netfilter/ebt_log.c | |||
@@ -206,10 +206,10 @@ static void ebt_log(const struct sk_buff *skb, unsigned int hooknr, | |||
206 | li.u.log.logflags = info->bitmask; | 206 | li.u.log.logflags = info->bitmask; |
207 | 207 | ||
208 | if (info->bitmask & EBT_LOG_NFLOG) | 208 | if (info->bitmask & EBT_LOG_NFLOG) |
209 | nf_log_packet(PF_BRIDGE, hooknr, skb, in, out, &li, | 209 | nf_log_packet(NFPROTO_BRIDGE, hooknr, skb, in, out, &li, |
210 | "%s", info->prefix); | 210 | "%s", info->prefix); |
211 | else | 211 | else |
212 | ebt_log_packet(PF_BRIDGE, hooknr, skb, in, out, &li, | 212 | ebt_log_packet(NFPROTO_BRIDGE, hooknr, skb, in, out, &li, |
213 | info->prefix); | 213 | info->prefix); |
214 | } | 214 | } |
215 | 215 | ||
@@ -234,7 +234,7 @@ static int __init ebt_log_init(void) | |||
234 | ret = ebt_register_watcher(&log); | 234 | ret = ebt_register_watcher(&log); |
235 | if (ret < 0) | 235 | if (ret < 0) |
236 | return ret; | 236 | return ret; |
237 | nf_log_register(PF_BRIDGE, &ebt_log_logger); | 237 | nf_log_register(NFPROTO_BRIDGE, &ebt_log_logger); |
238 | return 0; | 238 | return 0; |
239 | } | 239 | } |
240 | 240 | ||
diff --git a/net/bridge/netfilter/ebt_ulog.c b/net/bridge/netfilter/ebt_ulog.c index c84bda61afba..3b1678cd66f1 100644 --- a/net/bridge/netfilter/ebt_ulog.c +++ b/net/bridge/netfilter/ebt_ulog.c | |||
@@ -310,7 +310,7 @@ static int __init ebt_ulog_init(void) | |||
310 | netlink_kernel_release(ebtulognl); | 310 | netlink_kernel_release(ebtulognl); |
311 | 311 | ||
312 | if (ret == 0) | 312 | if (ret == 0) |
313 | nf_log_register(PF_BRIDGE, &ebt_ulog_logger); | 313 | nf_log_register(NFPROTO_BRIDGE, &ebt_ulog_logger); |
314 | 314 | ||
315 | return ret; | 315 | return ret; |
316 | } | 316 | } |
diff --git a/net/ipv4/netfilter/arp_tables.c b/net/ipv4/netfilter/arp_tables.c index 03e83a65aec5..b4a9a1799c94 100644 --- a/net/ipv4/netfilter/arp_tables.c +++ b/net/ipv4/netfilter/arp_tables.c | |||
@@ -463,7 +463,8 @@ static inline int check_target(struct arpt_entry *e, const char *name) | |||
463 | t = arpt_get_target(e); | 463 | t = arpt_get_target(e); |
464 | target = t->u.kernel.target; | 464 | target = t->u.kernel.target; |
465 | 465 | ||
466 | ret = xt_check_target(target, NF_ARP, t->u.target_size - sizeof(*t), | 466 | ret = xt_check_target(target, NFPROTO_ARP, |
467 | t->u.target_size - sizeof(*t), | ||
467 | name, e->comefrom, 0, 0); | 468 | name, e->comefrom, 0, 0); |
468 | if (!ret && t->u.kernel.target->checkentry | 469 | if (!ret && t->u.kernel.target->checkentry |
469 | && !t->u.kernel.target->checkentry(name, e, target, t->data, | 470 | && !t->u.kernel.target->checkentry(name, e, target, t->data, |
@@ -488,7 +489,8 @@ find_check_entry(struct arpt_entry *e, const char *name, unsigned int size, | |||
488 | return ret; | 489 | return ret; |
489 | 490 | ||
490 | t = arpt_get_target(e); | 491 | t = arpt_get_target(e); |
491 | target = try_then_request_module(xt_find_target(NF_ARP, t->u.user.name, | 492 | target = try_then_request_module(xt_find_target(NFPROTO_ARP, |
493 | t->u.user.name, | ||
492 | t->u.user.revision), | 494 | t->u.user.revision), |
493 | "arpt_%s", t->u.user.name); | 495 | "arpt_%s", t->u.user.name); |
494 | if (IS_ERR(target) || !target) { | 496 | if (IS_ERR(target) || !target) { |
@@ -788,7 +790,7 @@ static void compat_standard_from_user(void *dst, void *src) | |||
788 | int v = *(compat_int_t *)src; | 790 | int v = *(compat_int_t *)src; |
789 | 791 | ||
790 | if (v > 0) | 792 | if (v > 0) |
791 | v += xt_compat_calc_jump(NF_ARP, v); | 793 | v += xt_compat_calc_jump(NFPROTO_ARP, v); |
792 | memcpy(dst, &v, sizeof(v)); | 794 | memcpy(dst, &v, sizeof(v)); |
793 | } | 795 | } |
794 | 796 | ||
@@ -797,7 +799,7 @@ static int compat_standard_to_user(void __user *dst, void *src) | |||
797 | compat_int_t cv = *(int *)src; | 799 | compat_int_t cv = *(int *)src; |
798 | 800 | ||
799 | if (cv > 0) | 801 | if (cv > 0) |
800 | cv -= xt_compat_calc_jump(NF_ARP, cv); | 802 | cv -= xt_compat_calc_jump(NFPROTO_ARP, cv); |
801 | return copy_to_user(dst, &cv, sizeof(cv)) ? -EFAULT : 0; | 803 | return copy_to_user(dst, &cv, sizeof(cv)) ? -EFAULT : 0; |
802 | } | 804 | } |
803 | 805 | ||
@@ -815,7 +817,7 @@ static int compat_calc_entry(struct arpt_entry *e, | |||
815 | t = arpt_get_target(e); | 817 | t = arpt_get_target(e); |
816 | off += xt_compat_target_offset(t->u.kernel.target); | 818 | off += xt_compat_target_offset(t->u.kernel.target); |
817 | newinfo->size -= off; | 819 | newinfo->size -= off; |
818 | ret = xt_compat_add_offset(NF_ARP, entry_offset, off); | 820 | ret = xt_compat_add_offset(NFPROTO_ARP, entry_offset, off); |
819 | if (ret) | 821 | if (ret) |
820 | return ret; | 822 | return ret; |
821 | 823 | ||
@@ -866,9 +868,9 @@ static int get_info(struct net *net, void __user *user, int *len, int compat) | |||
866 | name[ARPT_TABLE_MAXNAMELEN-1] = '\0'; | 868 | name[ARPT_TABLE_MAXNAMELEN-1] = '\0'; |
867 | #ifdef CONFIG_COMPAT | 869 | #ifdef CONFIG_COMPAT |
868 | if (compat) | 870 | if (compat) |
869 | xt_compat_lock(NF_ARP); | 871 | xt_compat_lock(NFPROTO_ARP); |
870 | #endif | 872 | #endif |
871 | t = try_then_request_module(xt_find_table_lock(net, NF_ARP, name), | 873 | t = try_then_request_module(xt_find_table_lock(net, NFPROTO_ARP, name), |
872 | "arptable_%s", name); | 874 | "arptable_%s", name); |
873 | if (t && !IS_ERR(t)) { | 875 | if (t && !IS_ERR(t)) { |
874 | struct arpt_getinfo info; | 876 | struct arpt_getinfo info; |
@@ -878,7 +880,7 @@ static int get_info(struct net *net, void __user *user, int *len, int compat) | |||
878 | if (compat) { | 880 | if (compat) { |
879 | struct xt_table_info tmp; | 881 | struct xt_table_info tmp; |
880 | ret = compat_table_info(private, &tmp); | 882 | ret = compat_table_info(private, &tmp); |
881 | xt_compat_flush_offsets(NF_ARP); | 883 | xt_compat_flush_offsets(NFPROTO_ARP); |
882 | private = &tmp; | 884 | private = &tmp; |
883 | } | 885 | } |
884 | #endif | 886 | #endif |
@@ -901,7 +903,7 @@ static int get_info(struct net *net, void __user *user, int *len, int compat) | |||
901 | ret = t ? PTR_ERR(t) : -ENOENT; | 903 | ret = t ? PTR_ERR(t) : -ENOENT; |
902 | #ifdef CONFIG_COMPAT | 904 | #ifdef CONFIG_COMPAT |
903 | if (compat) | 905 | if (compat) |
904 | xt_compat_unlock(NF_ARP); | 906 | xt_compat_unlock(NFPROTO_ARP); |
905 | #endif | 907 | #endif |
906 | return ret; | 908 | return ret; |
907 | } | 909 | } |
@@ -925,7 +927,7 @@ static int get_entries(struct net *net, struct arpt_get_entries __user *uptr, | |||
925 | return -EINVAL; | 927 | return -EINVAL; |
926 | } | 928 | } |
927 | 929 | ||
928 | t = xt_find_table_lock(net, NF_ARP, get.name); | 930 | t = xt_find_table_lock(net, NFPROTO_ARP, get.name); |
929 | if (t && !IS_ERR(t)) { | 931 | if (t && !IS_ERR(t)) { |
930 | const struct xt_table_info *private = t->private; | 932 | const struct xt_table_info *private = t->private; |
931 | 933 | ||
@@ -967,7 +969,7 @@ static int __do_replace(struct net *net, const char *name, | |||
967 | goto out; | 969 | goto out; |
968 | } | 970 | } |
969 | 971 | ||
970 | t = try_then_request_module(xt_find_table_lock(net, NF_ARP, name), | 972 | t = try_then_request_module(xt_find_table_lock(net, NFPROTO_ARP, name), |
971 | "arptable_%s", name); | 973 | "arptable_%s", name); |
972 | if (!t || IS_ERR(t)) { | 974 | if (!t || IS_ERR(t)) { |
973 | ret = t ? PTR_ERR(t) : -ENOENT; | 975 | ret = t ? PTR_ERR(t) : -ENOENT; |
@@ -1134,7 +1136,7 @@ static int do_add_counters(struct net *net, void __user *user, unsigned int len, | |||
1134 | goto free; | 1136 | goto free; |
1135 | } | 1137 | } |
1136 | 1138 | ||
1137 | t = xt_find_table_lock(net, NF_ARP, name); | 1139 | t = xt_find_table_lock(net, NFPROTO_ARP, name); |
1138 | if (!t || IS_ERR(t)) { | 1140 | if (!t || IS_ERR(t)) { |
1139 | ret = t ? PTR_ERR(t) : -ENOENT; | 1141 | ret = t ? PTR_ERR(t) : -ENOENT; |
1140 | goto free; | 1142 | goto free; |
@@ -1218,7 +1220,7 @@ check_compat_entry_size_and_hooks(struct compat_arpt_entry *e, | |||
1218 | entry_offset = (void *)e - (void *)base; | 1220 | entry_offset = (void *)e - (void *)base; |
1219 | 1221 | ||
1220 | t = compat_arpt_get_target(e); | 1222 | t = compat_arpt_get_target(e); |
1221 | target = try_then_request_module(xt_find_target(NF_ARP, | 1223 | target = try_then_request_module(xt_find_target(NFPROTO_ARP, |
1222 | t->u.user.name, | 1224 | t->u.user.name, |
1223 | t->u.user.revision), | 1225 | t->u.user.revision), |
1224 | "arpt_%s", t->u.user.name); | 1226 | "arpt_%s", t->u.user.name); |
@@ -1232,7 +1234,7 @@ check_compat_entry_size_and_hooks(struct compat_arpt_entry *e, | |||
1232 | 1234 | ||
1233 | off += xt_compat_target_offset(target); | 1235 | off += xt_compat_target_offset(target); |
1234 | *size += off; | 1236 | *size += off; |
1235 | ret = xt_compat_add_offset(NF_ARP, entry_offset, off); | 1237 | ret = xt_compat_add_offset(NFPROTO_ARP, entry_offset, off); |
1236 | if (ret) | 1238 | if (ret) |
1237 | goto release_target; | 1239 | goto release_target; |
1238 | 1240 | ||
@@ -1333,7 +1335,7 @@ static int translate_compat_table(const char *name, | |||
1333 | 1335 | ||
1334 | duprintf("translate_compat_table: size %u\n", info->size); | 1336 | duprintf("translate_compat_table: size %u\n", info->size); |
1335 | j = 0; | 1337 | j = 0; |
1336 | xt_compat_lock(NF_ARP); | 1338 | xt_compat_lock(NFPROTO_ARP); |
1337 | /* Walk through entries, checking offsets. */ | 1339 | /* Walk through entries, checking offsets. */ |
1338 | ret = COMPAT_ARPT_ENTRY_ITERATE(entry0, total_size, | 1340 | ret = COMPAT_ARPT_ENTRY_ITERATE(entry0, total_size, |
1339 | check_compat_entry_size_and_hooks, | 1341 | check_compat_entry_size_and_hooks, |
@@ -1383,8 +1385,8 @@ static int translate_compat_table(const char *name, | |||
1383 | ret = COMPAT_ARPT_ENTRY_ITERATE(entry0, total_size, | 1385 | ret = COMPAT_ARPT_ENTRY_ITERATE(entry0, total_size, |
1384 | compat_copy_entry_from_user, | 1386 | compat_copy_entry_from_user, |
1385 | &pos, &size, name, newinfo, entry1); | 1387 | &pos, &size, name, newinfo, entry1); |
1386 | xt_compat_flush_offsets(NF_ARP); | 1388 | xt_compat_flush_offsets(NFPROTO_ARP); |
1387 | xt_compat_unlock(NF_ARP); | 1389 | xt_compat_unlock(NFPROTO_ARP); |
1388 | if (ret) | 1390 | if (ret) |
1389 | goto free_newinfo; | 1391 | goto free_newinfo; |
1390 | 1392 | ||
@@ -1420,8 +1422,8 @@ out: | |||
1420 | COMPAT_ARPT_ENTRY_ITERATE(entry0, total_size, compat_release_entry, &j); | 1422 | COMPAT_ARPT_ENTRY_ITERATE(entry0, total_size, compat_release_entry, &j); |
1421 | return ret; | 1423 | return ret; |
1422 | out_unlock: | 1424 | out_unlock: |
1423 | xt_compat_flush_offsets(NF_ARP); | 1425 | xt_compat_flush_offsets(NFPROTO_ARP); |
1424 | xt_compat_unlock(NF_ARP); | 1426 | xt_compat_unlock(NFPROTO_ARP); |
1425 | goto out; | 1427 | goto out; |
1426 | } | 1428 | } |
1427 | 1429 | ||
@@ -1607,8 +1609,8 @@ static int compat_get_entries(struct net *net, | |||
1607 | return -EINVAL; | 1609 | return -EINVAL; |
1608 | } | 1610 | } |
1609 | 1611 | ||
1610 | xt_compat_lock(NF_ARP); | 1612 | xt_compat_lock(NFPROTO_ARP); |
1611 | t = xt_find_table_lock(net, NF_ARP, get.name); | 1613 | t = xt_find_table_lock(net, NFPROTO_ARP, get.name); |
1612 | if (t && !IS_ERR(t)) { | 1614 | if (t && !IS_ERR(t)) { |
1613 | const struct xt_table_info *private = t->private; | 1615 | const struct xt_table_info *private = t->private; |
1614 | struct xt_table_info info; | 1616 | struct xt_table_info info; |
@@ -1623,13 +1625,13 @@ static int compat_get_entries(struct net *net, | |||
1623 | private->size, get.size); | 1625 | private->size, get.size); |
1624 | ret = -EAGAIN; | 1626 | ret = -EAGAIN; |
1625 | } | 1627 | } |
1626 | xt_compat_flush_offsets(NF_ARP); | 1628 | xt_compat_flush_offsets(NFPROTO_ARP); |
1627 | module_put(t->me); | 1629 | module_put(t->me); |
1628 | xt_table_unlock(t); | 1630 | xt_table_unlock(t); |
1629 | } else | 1631 | } else |
1630 | ret = t ? PTR_ERR(t) : -ENOENT; | 1632 | ret = t ? PTR_ERR(t) : -ENOENT; |
1631 | 1633 | ||
1632 | xt_compat_unlock(NF_ARP); | 1634 | xt_compat_unlock(NFPROTO_ARP); |
1633 | return ret; | 1635 | return ret; |
1634 | } | 1636 | } |
1635 | 1637 | ||
@@ -1709,7 +1711,7 @@ static int do_arpt_get_ctl(struct sock *sk, int cmd, void __user *user, int *len | |||
1709 | break; | 1711 | break; |
1710 | } | 1712 | } |
1711 | 1713 | ||
1712 | try_then_request_module(xt_find_revision(NF_ARP, rev.name, | 1714 | try_then_request_module(xt_find_revision(NFPROTO_ARP, rev.name, |
1713 | rev.revision, 1, &ret), | 1715 | rev.revision, 1, &ret), |
1714 | "arpt_%s", rev.name); | 1716 | "arpt_%s", rev.name); |
1715 | break; | 1717 | break; |
@@ -1787,7 +1789,7 @@ void arpt_unregister_table(struct xt_table *table) | |||
1787 | static struct xt_target arpt_standard_target __read_mostly = { | 1789 | static struct xt_target arpt_standard_target __read_mostly = { |
1788 | .name = ARPT_STANDARD_TARGET, | 1790 | .name = ARPT_STANDARD_TARGET, |
1789 | .targetsize = sizeof(int), | 1791 | .targetsize = sizeof(int), |
1790 | .family = NF_ARP, | 1792 | .family = NFPROTO_ARP, |
1791 | #ifdef CONFIG_COMPAT | 1793 | #ifdef CONFIG_COMPAT |
1792 | .compatsize = sizeof(compat_int_t), | 1794 | .compatsize = sizeof(compat_int_t), |
1793 | .compat_from_user = compat_standard_from_user, | 1795 | .compat_from_user = compat_standard_from_user, |
@@ -1799,7 +1801,7 @@ static struct xt_target arpt_error_target __read_mostly = { | |||
1799 | .name = ARPT_ERROR_TARGET, | 1801 | .name = ARPT_ERROR_TARGET, |
1800 | .target = arpt_error, | 1802 | .target = arpt_error, |
1801 | .targetsize = ARPT_FUNCTION_MAXNAMELEN, | 1803 | .targetsize = ARPT_FUNCTION_MAXNAMELEN, |
1802 | .family = NF_ARP, | 1804 | .family = NFPROTO_ARP, |
1803 | }; | 1805 | }; |
1804 | 1806 | ||
1805 | static struct nf_sockopt_ops arpt_sockopts = { | 1807 | static struct nf_sockopt_ops arpt_sockopts = { |
@@ -1821,12 +1823,12 @@ static struct nf_sockopt_ops arpt_sockopts = { | |||
1821 | 1823 | ||
1822 | static int __net_init arp_tables_net_init(struct net *net) | 1824 | static int __net_init arp_tables_net_init(struct net *net) |
1823 | { | 1825 | { |
1824 | return xt_proto_init(net, NF_ARP); | 1826 | return xt_proto_init(net, NFPROTO_ARP); |
1825 | } | 1827 | } |
1826 | 1828 | ||
1827 | static void __net_exit arp_tables_net_exit(struct net *net) | 1829 | static void __net_exit arp_tables_net_exit(struct net *net) |
1828 | { | 1830 | { |
1829 | xt_proto_fini(net, NF_ARP); | 1831 | xt_proto_fini(net, NFPROTO_ARP); |
1830 | } | 1832 | } |
1831 | 1833 | ||
1832 | static struct pernet_operations arp_tables_net_ops = { | 1834 | static struct pernet_operations arp_tables_net_ops = { |
diff --git a/net/ipv4/netfilter/arpt_mangle.c b/net/ipv4/netfilter/arpt_mangle.c index a385959d2655..3f9e4ccd6168 100644 --- a/net/ipv4/netfilter/arpt_mangle.c +++ b/net/ipv4/netfilter/arpt_mangle.c | |||
@@ -75,7 +75,7 @@ checkentry(const char *tablename, const void *e, const struct xt_target *target, | |||
75 | 75 | ||
76 | static struct xt_target arpt_mangle_reg __read_mostly = { | 76 | static struct xt_target arpt_mangle_reg __read_mostly = { |
77 | .name = "mangle", | 77 | .name = "mangle", |
78 | .family = NF_ARP, | 78 | .family = NFPROTO_ARP, |
79 | .target = target, | 79 | .target = target, |
80 | .targetsize = sizeof(struct arpt_mangle), | 80 | .targetsize = sizeof(struct arpt_mangle), |
81 | .checkentry = checkentry, | 81 | .checkentry = checkentry, |
diff --git a/net/ipv4/netfilter/arptable_filter.c b/net/ipv4/netfilter/arptable_filter.c index 082f5dd3156c..bee3d117661a 100644 --- a/net/ipv4/netfilter/arptable_filter.c +++ b/net/ipv4/netfilter/arptable_filter.c | |||
@@ -51,7 +51,7 @@ static struct xt_table packet_filter = { | |||
51 | .lock = __RW_LOCK_UNLOCKED(packet_filter.lock), | 51 | .lock = __RW_LOCK_UNLOCKED(packet_filter.lock), |
52 | .private = NULL, | 52 | .private = NULL, |
53 | .me = THIS_MODULE, | 53 | .me = THIS_MODULE, |
54 | .af = NF_ARP, | 54 | .af = NFPROTO_ARP, |
55 | }; | 55 | }; |
56 | 56 | ||
57 | /* The work comes in here from netfilter.c */ | 57 | /* The work comes in here from netfilter.c */ |
@@ -89,21 +89,21 @@ static struct nf_hook_ops arpt_ops[] __read_mostly = { | |||
89 | { | 89 | { |
90 | .hook = arpt_in_hook, | 90 | .hook = arpt_in_hook, |
91 | .owner = THIS_MODULE, | 91 | .owner = THIS_MODULE, |
92 | .pf = NF_ARP, | 92 | .pf = NFPROTO_ARP, |
93 | .hooknum = NF_ARP_IN, | 93 | .hooknum = NF_ARP_IN, |
94 | .priority = NF_IP_PRI_FILTER, | 94 | .priority = NF_IP_PRI_FILTER, |
95 | }, | 95 | }, |
96 | { | 96 | { |
97 | .hook = arpt_out_hook, | 97 | .hook = arpt_out_hook, |
98 | .owner = THIS_MODULE, | 98 | .owner = THIS_MODULE, |
99 | .pf = NF_ARP, | 99 | .pf = NFPROTO_ARP, |
100 | .hooknum = NF_ARP_OUT, | 100 | .hooknum = NF_ARP_OUT, |
101 | .priority = NF_IP_PRI_FILTER, | 101 | .priority = NF_IP_PRI_FILTER, |
102 | }, | 102 | }, |
103 | { | 103 | { |
104 | .hook = arpt_forward_hook, | 104 | .hook = arpt_forward_hook, |
105 | .owner = THIS_MODULE, | 105 | .owner = THIS_MODULE, |
106 | .pf = NF_ARP, | 106 | .pf = NFPROTO_ARP, |
107 | .hooknum = NF_ARP_FORWARD, | 107 | .hooknum = NF_ARP_FORWARD, |
108 | .priority = NF_IP_PRI_FILTER, | 108 | .priority = NF_IP_PRI_FILTER, |
109 | }, | 109 | }, |
diff --git a/net/ipv4/netfilter/ipt_CLUSTERIP.c b/net/ipv4/netfilter/ipt_CLUSTERIP.c index fafe8ebb4c55..63faddc18a1c 100644 --- a/net/ipv4/netfilter/ipt_CLUSTERIP.c +++ b/net/ipv4/netfilter/ipt_CLUSTERIP.c | |||
@@ -445,7 +445,7 @@ struct compat_ipt_clusterip_tgt_info | |||
445 | 445 | ||
446 | static struct xt_target clusterip_tg_reg __read_mostly = { | 446 | static struct xt_target clusterip_tg_reg __read_mostly = { |
447 | .name = "CLUSTERIP", | 447 | .name = "CLUSTERIP", |
448 | .family = AF_INET, | 448 | .family = NFPROTO_IPV4, |
449 | .target = clusterip_tg, | 449 | .target = clusterip_tg, |
450 | .checkentry = clusterip_tg_check, | 450 | .checkentry = clusterip_tg_check, |
451 | .destroy = clusterip_tg_destroy, | 451 | .destroy = clusterip_tg_destroy, |
@@ -546,7 +546,7 @@ arp_mangle(unsigned int hook, | |||
546 | 546 | ||
547 | static struct nf_hook_ops cip_arp_ops __read_mostly = { | 547 | static struct nf_hook_ops cip_arp_ops __read_mostly = { |
548 | .hook = arp_mangle, | 548 | .hook = arp_mangle, |
549 | .pf = NF_ARP, | 549 | .pf = NFPROTO_ARP, |
550 | .hooknum = NF_ARP_OUT, | 550 | .hooknum = NF_ARP_OUT, |
551 | .priority = -1 | 551 | .priority = -1 |
552 | }; | 552 | }; |
diff --git a/net/ipv4/netfilter/ipt_ECN.c b/net/ipv4/netfilter/ipt_ECN.c index d60139c134ca..aee2364afffd 100644 --- a/net/ipv4/netfilter/ipt_ECN.c +++ b/net/ipv4/netfilter/ipt_ECN.c | |||
@@ -124,7 +124,7 @@ ecn_tg_check(const char *tablename, const void *e_void, | |||
124 | 124 | ||
125 | static struct xt_target ecn_tg_reg __read_mostly = { | 125 | static struct xt_target ecn_tg_reg __read_mostly = { |
126 | .name = "ECN", | 126 | .name = "ECN", |
127 | .family = AF_INET, | 127 | .family = NFPROTO_IPV4, |
128 | .target = ecn_tg, | 128 | .target = ecn_tg, |
129 | .targetsize = sizeof(struct ipt_ECN_info), | 129 | .targetsize = sizeof(struct ipt_ECN_info), |
130 | .table = "mangle", | 130 | .table = "mangle", |
diff --git a/net/ipv4/netfilter/ipt_LOG.c b/net/ipv4/netfilter/ipt_LOG.c index 9330ba3577e1..1c9785df4df7 100644 --- a/net/ipv4/netfilter/ipt_LOG.c +++ b/net/ipv4/netfilter/ipt_LOG.c | |||
@@ -437,7 +437,7 @@ log_tg(struct sk_buff *skb, const struct net_device *in, | |||
437 | li.u.log.level = loginfo->level; | 437 | li.u.log.level = loginfo->level; |
438 | li.u.log.logflags = loginfo->logflags; | 438 | li.u.log.logflags = loginfo->logflags; |
439 | 439 | ||
440 | ipt_log_packet(PF_INET, hooknum, skb, in, out, &li, | 440 | ipt_log_packet(NFPROTO_IPV4, hooknum, skb, in, out, &li, |
441 | loginfo->prefix); | 441 | loginfo->prefix); |
442 | return XT_CONTINUE; | 442 | return XT_CONTINUE; |
443 | } | 443 | } |
@@ -463,7 +463,7 @@ log_tg_check(const char *tablename, const void *e, | |||
463 | 463 | ||
464 | static struct xt_target log_tg_reg __read_mostly = { | 464 | static struct xt_target log_tg_reg __read_mostly = { |
465 | .name = "LOG", | 465 | .name = "LOG", |
466 | .family = AF_INET, | 466 | .family = NFPROTO_IPV4, |
467 | .target = log_tg, | 467 | .target = log_tg, |
468 | .targetsize = sizeof(struct ipt_log_info), | 468 | .targetsize = sizeof(struct ipt_log_info), |
469 | .checkentry = log_tg_check, | 469 | .checkentry = log_tg_check, |
@@ -483,7 +483,7 @@ static int __init log_tg_init(void) | |||
483 | ret = xt_register_target(&log_tg_reg); | 483 | ret = xt_register_target(&log_tg_reg); |
484 | if (ret < 0) | 484 | if (ret < 0) |
485 | return ret; | 485 | return ret; |
486 | nf_log_register(PF_INET, &ipt_log_logger); | 486 | nf_log_register(NFPROTO_IPV4, &ipt_log_logger); |
487 | return 0; | 487 | return 0; |
488 | } | 488 | } |
489 | 489 | ||
diff --git a/net/ipv4/netfilter/ipt_MASQUERADE.c b/net/ipv4/netfilter/ipt_MASQUERADE.c index 0841aefaa503..9a4822f8243f 100644 --- a/net/ipv4/netfilter/ipt_MASQUERADE.c +++ b/net/ipv4/netfilter/ipt_MASQUERADE.c | |||
@@ -153,7 +153,7 @@ static struct notifier_block masq_inet_notifier = { | |||
153 | 153 | ||
154 | static struct xt_target masquerade_tg_reg __read_mostly = { | 154 | static struct xt_target masquerade_tg_reg __read_mostly = { |
155 | .name = "MASQUERADE", | 155 | .name = "MASQUERADE", |
156 | .family = AF_INET, | 156 | .family = NFPROTO_IPV4, |
157 | .target = masquerade_tg, | 157 | .target = masquerade_tg, |
158 | .targetsize = sizeof(struct nf_nat_multi_range_compat), | 158 | .targetsize = sizeof(struct nf_nat_multi_range_compat), |
159 | .table = "nat", | 159 | .table = "nat", |
diff --git a/net/ipv4/netfilter/ipt_NETMAP.c b/net/ipv4/netfilter/ipt_NETMAP.c index 6739abfd1521..f281500bd7fa 100644 --- a/net/ipv4/netfilter/ipt_NETMAP.c +++ b/net/ipv4/netfilter/ipt_NETMAP.c | |||
@@ -75,7 +75,7 @@ netmap_tg(struct sk_buff *skb, const struct net_device *in, | |||
75 | 75 | ||
76 | static struct xt_target netmap_tg_reg __read_mostly = { | 76 | static struct xt_target netmap_tg_reg __read_mostly = { |
77 | .name = "NETMAP", | 77 | .name = "NETMAP", |
78 | .family = AF_INET, | 78 | .family = NFPROTO_IPV4, |
79 | .target = netmap_tg, | 79 | .target = netmap_tg, |
80 | .targetsize = sizeof(struct nf_nat_multi_range_compat), | 80 | .targetsize = sizeof(struct nf_nat_multi_range_compat), |
81 | .table = "nat", | 81 | .table = "nat", |
diff --git a/net/ipv4/netfilter/ipt_REDIRECT.c b/net/ipv4/netfilter/ipt_REDIRECT.c index 5c6292449d13..ef496105eae1 100644 --- a/net/ipv4/netfilter/ipt_REDIRECT.c +++ b/net/ipv4/netfilter/ipt_REDIRECT.c | |||
@@ -92,7 +92,7 @@ redirect_tg(struct sk_buff *skb, const struct net_device *in, | |||
92 | 92 | ||
93 | static struct xt_target redirect_tg_reg __read_mostly = { | 93 | static struct xt_target redirect_tg_reg __read_mostly = { |
94 | .name = "REDIRECT", | 94 | .name = "REDIRECT", |
95 | .family = AF_INET, | 95 | .family = NFPROTO_IPV4, |
96 | .target = redirect_tg, | 96 | .target = redirect_tg, |
97 | .targetsize = sizeof(struct nf_nat_multi_range_compat), | 97 | .targetsize = sizeof(struct nf_nat_multi_range_compat), |
98 | .table = "nat", | 98 | .table = "nat", |
diff --git a/net/ipv4/netfilter/ipt_REJECT.c b/net/ipv4/netfilter/ipt_REJECT.c index 2639872849da..9f5da0c2cae8 100644 --- a/net/ipv4/netfilter/ipt_REJECT.c +++ b/net/ipv4/netfilter/ipt_REJECT.c | |||
@@ -201,7 +201,7 @@ reject_tg_check(const char *tablename, const void *e_void, | |||
201 | 201 | ||
202 | static struct xt_target reject_tg_reg __read_mostly = { | 202 | static struct xt_target reject_tg_reg __read_mostly = { |
203 | .name = "REJECT", | 203 | .name = "REJECT", |
204 | .family = AF_INET, | 204 | .family = NFPROTO_IPV4, |
205 | .target = reject_tg, | 205 | .target = reject_tg, |
206 | .targetsize = sizeof(struct ipt_reject_info), | 206 | .targetsize = sizeof(struct ipt_reject_info), |
207 | .table = "filter", | 207 | .table = "filter", |
diff --git a/net/ipv4/netfilter/ipt_TTL.c b/net/ipv4/netfilter/ipt_TTL.c index 30eed65e7338..7d01d424a71a 100644 --- a/net/ipv4/netfilter/ipt_TTL.c +++ b/net/ipv4/netfilter/ipt_TTL.c | |||
@@ -80,7 +80,7 @@ ttl_tg_check(const char *tablename, const void *e, | |||
80 | 80 | ||
81 | static struct xt_target ttl_tg_reg __read_mostly = { | 81 | static struct xt_target ttl_tg_reg __read_mostly = { |
82 | .name = "TTL", | 82 | .name = "TTL", |
83 | .family = AF_INET, | 83 | .family = NFPROTO_IPV4, |
84 | .target = ttl_tg, | 84 | .target = ttl_tg, |
85 | .targetsize = sizeof(struct ipt_TTL_info), | 85 | .targetsize = sizeof(struct ipt_TTL_info), |
86 | .table = "mangle", | 86 | .table = "mangle", |
diff --git a/net/ipv4/netfilter/ipt_ULOG.c b/net/ipv4/netfilter/ipt_ULOG.c index d8241e6b077b..9065e4a34fbc 100644 --- a/net/ipv4/netfilter/ipt_ULOG.c +++ b/net/ipv4/netfilter/ipt_ULOG.c | |||
@@ -374,7 +374,7 @@ static int ulog_tg_compat_to_user(void __user *dst, void *src) | |||
374 | 374 | ||
375 | static struct xt_target ulog_tg_reg __read_mostly = { | 375 | static struct xt_target ulog_tg_reg __read_mostly = { |
376 | .name = "ULOG", | 376 | .name = "ULOG", |
377 | .family = AF_INET, | 377 | .family = NFPROTO_IPV4, |
378 | .target = ulog_tg, | 378 | .target = ulog_tg, |
379 | .targetsize = sizeof(struct ipt_ulog_info), | 379 | .targetsize = sizeof(struct ipt_ulog_info), |
380 | .checkentry = ulog_tg_check, | 380 | .checkentry = ulog_tg_check, |
@@ -419,7 +419,7 @@ static int __init ulog_tg_init(void) | |||
419 | return ret; | 419 | return ret; |
420 | } | 420 | } |
421 | if (nflog) | 421 | if (nflog) |
422 | nf_log_register(PF_INET, &ipt_ulog_logger); | 422 | nf_log_register(NFPROTO_IPV4, &ipt_ulog_logger); |
423 | 423 | ||
424 | return 0; | 424 | return 0; |
425 | } | 425 | } |
diff --git a/net/ipv4/netfilter/ipt_addrtype.c b/net/ipv4/netfilter/ipt_addrtype.c index 462a22c97877..2c9d88a6c838 100644 --- a/net/ipv4/netfilter/ipt_addrtype.c +++ b/net/ipv4/netfilter/ipt_addrtype.c | |||
@@ -108,14 +108,14 @@ addrtype_mt_checkentry_v1(const char *tablename, const void *ip_void, | |||
108 | static struct xt_match addrtype_mt_reg[] __read_mostly = { | 108 | static struct xt_match addrtype_mt_reg[] __read_mostly = { |
109 | { | 109 | { |
110 | .name = "addrtype", | 110 | .name = "addrtype", |
111 | .family = AF_INET, | 111 | .family = NFPROTO_IPV4, |
112 | .match = addrtype_mt_v0, | 112 | .match = addrtype_mt_v0, |
113 | .matchsize = sizeof(struct ipt_addrtype_info), | 113 | .matchsize = sizeof(struct ipt_addrtype_info), |
114 | .me = THIS_MODULE | 114 | .me = THIS_MODULE |
115 | }, | 115 | }, |
116 | { | 116 | { |
117 | .name = "addrtype", | 117 | .name = "addrtype", |
118 | .family = AF_INET, | 118 | .family = NFPROTO_IPV4, |
119 | .revision = 1, | 119 | .revision = 1, |
120 | .match = addrtype_mt_v1, | 120 | .match = addrtype_mt_v1, |
121 | .checkentry = addrtype_mt_checkentry_v1, | 121 | .checkentry = addrtype_mt_checkentry_v1, |
diff --git a/net/ipv4/netfilter/ipt_ah.c b/net/ipv4/netfilter/ipt_ah.c index e977989629c7..e2e993edd665 100644 --- a/net/ipv4/netfilter/ipt_ah.c +++ b/net/ipv4/netfilter/ipt_ah.c | |||
@@ -83,7 +83,7 @@ ah_mt_check(const char *tablename, const void *ip_void, | |||
83 | 83 | ||
84 | static struct xt_match ah_mt_reg __read_mostly = { | 84 | static struct xt_match ah_mt_reg __read_mostly = { |
85 | .name = "ah", | 85 | .name = "ah", |
86 | .family = AF_INET, | 86 | .family = NFPROTO_IPV4, |
87 | .match = ah_mt, | 87 | .match = ah_mt, |
88 | .matchsize = sizeof(struct ipt_ah), | 88 | .matchsize = sizeof(struct ipt_ah), |
89 | .proto = IPPROTO_AH, | 89 | .proto = IPPROTO_AH, |
diff --git a/net/ipv4/netfilter/ipt_ecn.c b/net/ipv4/netfilter/ipt_ecn.c index 749de8284ce5..2c45b4be7c3c 100644 --- a/net/ipv4/netfilter/ipt_ecn.c +++ b/net/ipv4/netfilter/ipt_ecn.c | |||
@@ -114,7 +114,7 @@ ecn_mt_check(const char *tablename, const void *ip_void, | |||
114 | 114 | ||
115 | static struct xt_match ecn_mt_reg __read_mostly = { | 115 | static struct xt_match ecn_mt_reg __read_mostly = { |
116 | .name = "ecn", | 116 | .name = "ecn", |
117 | .family = AF_INET, | 117 | .family = NFPROTO_IPV4, |
118 | .match = ecn_mt, | 118 | .match = ecn_mt, |
119 | .matchsize = sizeof(struct ipt_ecn_info), | 119 | .matchsize = sizeof(struct ipt_ecn_info), |
120 | .checkentry = ecn_mt_check, | 120 | .checkentry = ecn_mt_check, |
diff --git a/net/ipv4/netfilter/ipt_ttl.c b/net/ipv4/netfilter/ipt_ttl.c index e0b8caeb710c..d4c3fdc2a79f 100644 --- a/net/ipv4/netfilter/ipt_ttl.c +++ b/net/ipv4/netfilter/ipt_ttl.c | |||
@@ -46,7 +46,7 @@ ttl_mt(const struct sk_buff *skb, const struct net_device *in, | |||
46 | 46 | ||
47 | static struct xt_match ttl_mt_reg __read_mostly = { | 47 | static struct xt_match ttl_mt_reg __read_mostly = { |
48 | .name = "ttl", | 48 | .name = "ttl", |
49 | .family = AF_INET, | 49 | .family = NFPROTO_IPV4, |
50 | .match = ttl_mt, | 50 | .match = ttl_mt, |
51 | .matchsize = sizeof(struct ipt_ttl_info), | 51 | .matchsize = sizeof(struct ipt_ttl_info), |
52 | .me = THIS_MODULE, | 52 | .me = THIS_MODULE, |
diff --git a/net/ipv6/netfilter/ip6t_HL.c b/net/ipv6/netfilter/ip6t_HL.c index d5f8fd5f29d3..7eebd3509166 100644 --- a/net/ipv6/netfilter/ip6t_HL.c +++ b/net/ipv6/netfilter/ip6t_HL.c | |||
@@ -78,7 +78,7 @@ hl_tg6_check(const char *tablename, const void *entry, | |||
78 | 78 | ||
79 | static struct xt_target hl_tg6_reg __read_mostly = { | 79 | static struct xt_target hl_tg6_reg __read_mostly = { |
80 | .name = "HL", | 80 | .name = "HL", |
81 | .family = AF_INET6, | 81 | .family = NFPROTO_IPV6, |
82 | .target = hl_tg6, | 82 | .target = hl_tg6, |
83 | .targetsize = sizeof(struct ip6t_HL_info), | 83 | .targetsize = sizeof(struct ip6t_HL_info), |
84 | .table = "mangle", | 84 | .table = "mangle", |
diff --git a/net/ipv6/netfilter/ip6t_LOG.c b/net/ipv6/netfilter/ip6t_LOG.c index 0716f8afa0bc..fd148f3d842f 100644 --- a/net/ipv6/netfilter/ip6t_LOG.c +++ b/net/ipv6/netfilter/ip6t_LOG.c | |||
@@ -449,7 +449,8 @@ log_tg6(struct sk_buff *skb, const struct net_device *in, | |||
449 | li.u.log.level = loginfo->level; | 449 | li.u.log.level = loginfo->level; |
450 | li.u.log.logflags = loginfo->logflags; | 450 | li.u.log.logflags = loginfo->logflags; |
451 | 451 | ||
452 | ip6t_log_packet(PF_INET6, hooknum, skb, in, out, &li, loginfo->prefix); | 452 | ip6t_log_packet(NFPROTO_IPV6, hooknum, skb, in, out, |
453 | &li, loginfo->prefix); | ||
453 | return XT_CONTINUE; | 454 | return XT_CONTINUE; |
454 | } | 455 | } |
455 | 456 | ||
@@ -475,7 +476,7 @@ log_tg6_check(const char *tablename, const void *entry, | |||
475 | 476 | ||
476 | static struct xt_target log_tg6_reg __read_mostly = { | 477 | static struct xt_target log_tg6_reg __read_mostly = { |
477 | .name = "LOG", | 478 | .name = "LOG", |
478 | .family = AF_INET6, | 479 | .family = NFPROTO_IPV6, |
479 | .target = log_tg6, | 480 | .target = log_tg6, |
480 | .targetsize = sizeof(struct ip6t_log_info), | 481 | .targetsize = sizeof(struct ip6t_log_info), |
481 | .checkentry = log_tg6_check, | 482 | .checkentry = log_tg6_check, |
@@ -495,7 +496,7 @@ static int __init log_tg6_init(void) | |||
495 | ret = xt_register_target(&log_tg6_reg); | 496 | ret = xt_register_target(&log_tg6_reg); |
496 | if (ret < 0) | 497 | if (ret < 0) |
497 | return ret; | 498 | return ret; |
498 | nf_log_register(PF_INET6, &ip6t_logger); | 499 | nf_log_register(NFPROTO_IPV6, &ip6t_logger); |
499 | return 0; | 500 | return 0; |
500 | } | 501 | } |
501 | 502 | ||
diff --git a/net/ipv6/netfilter/ip6t_REJECT.c b/net/ipv6/netfilter/ip6t_REJECT.c index 44c8d65a2431..672ad9ff3e27 100644 --- a/net/ipv6/netfilter/ip6t_REJECT.c +++ b/net/ipv6/netfilter/ip6t_REJECT.c | |||
@@ -237,7 +237,7 @@ reject_tg6_check(const char *tablename, const void *entry, | |||
237 | 237 | ||
238 | static struct xt_target reject_tg6_reg __read_mostly = { | 238 | static struct xt_target reject_tg6_reg __read_mostly = { |
239 | .name = "REJECT", | 239 | .name = "REJECT", |
240 | .family = AF_INET6, | 240 | .family = NFPROTO_IPV6, |
241 | .target = reject_tg6, | 241 | .target = reject_tg6, |
242 | .targetsize = sizeof(struct ip6t_reject_info), | 242 | .targetsize = sizeof(struct ip6t_reject_info), |
243 | .table = "filter", | 243 | .table = "filter", |
diff --git a/net/ipv6/netfilter/ip6t_ah.c b/net/ipv6/netfilter/ip6t_ah.c index 429629fd63b6..061f89beeb67 100644 --- a/net/ipv6/netfilter/ip6t_ah.c +++ b/net/ipv6/netfilter/ip6t_ah.c | |||
@@ -110,7 +110,7 @@ ah_mt6_check(const char *tablename, const void *entry, | |||
110 | 110 | ||
111 | static struct xt_match ah_mt6_reg __read_mostly = { | 111 | static struct xt_match ah_mt6_reg __read_mostly = { |
112 | .name = "ah", | 112 | .name = "ah", |
113 | .family = AF_INET6, | 113 | .family = NFPROTO_IPV6, |
114 | .match = ah_mt6, | 114 | .match = ah_mt6, |
115 | .matchsize = sizeof(struct ip6t_ah), | 115 | .matchsize = sizeof(struct ip6t_ah), |
116 | .checkentry = ah_mt6_check, | 116 | .checkentry = ah_mt6_check, |
diff --git a/net/ipv6/netfilter/ip6t_eui64.c b/net/ipv6/netfilter/ip6t_eui64.c index 8f331f12b2ec..ba38df1116f0 100644 --- a/net/ipv6/netfilter/ip6t_eui64.c +++ b/net/ipv6/netfilter/ip6t_eui64.c | |||
@@ -60,7 +60,7 @@ eui64_mt6(const struct sk_buff *skb, const struct net_device *in, | |||
60 | 60 | ||
61 | static struct xt_match eui64_mt6_reg __read_mostly = { | 61 | static struct xt_match eui64_mt6_reg __read_mostly = { |
62 | .name = "eui64", | 62 | .name = "eui64", |
63 | .family = AF_INET6, | 63 | .family = NFPROTO_IPV6, |
64 | .match = eui64_mt6, | 64 | .match = eui64_mt6, |
65 | .matchsize = sizeof(int), | 65 | .matchsize = sizeof(int), |
66 | .hooks = (1 << NF_INET_PRE_ROUTING) | (1 << NF_INET_LOCAL_IN) | | 66 | .hooks = (1 << NF_INET_PRE_ROUTING) | (1 << NF_INET_LOCAL_IN) | |
diff --git a/net/ipv6/netfilter/ip6t_frag.c b/net/ipv6/netfilter/ip6t_frag.c index e2bbc63dba5b..972f699af22c 100644 --- a/net/ipv6/netfilter/ip6t_frag.c +++ b/net/ipv6/netfilter/ip6t_frag.c | |||
@@ -127,7 +127,7 @@ frag_mt6_check(const char *tablename, const void *ip, | |||
127 | 127 | ||
128 | static struct xt_match frag_mt6_reg __read_mostly = { | 128 | static struct xt_match frag_mt6_reg __read_mostly = { |
129 | .name = "frag", | 129 | .name = "frag", |
130 | .family = AF_INET6, | 130 | .family = NFPROTO_IPV6, |
131 | .match = frag_mt6, | 131 | .match = frag_mt6, |
132 | .matchsize = sizeof(struct ip6t_frag), | 132 | .matchsize = sizeof(struct ip6t_frag), |
133 | .checkentry = frag_mt6_check, | 133 | .checkentry = frag_mt6_check, |
diff --git a/net/ipv6/netfilter/ip6t_hbh.c b/net/ipv6/netfilter/ip6t_hbh.c index 26654b26d7fa..d5edb51a595a 100644 --- a/net/ipv6/netfilter/ip6t_hbh.c +++ b/net/ipv6/netfilter/ip6t_hbh.c | |||
@@ -187,7 +187,7 @@ hbh_mt6_check(const char *tablename, const void *entry, | |||
187 | static struct xt_match hbh_mt6_reg[] __read_mostly = { | 187 | static struct xt_match hbh_mt6_reg[] __read_mostly = { |
188 | { | 188 | { |
189 | .name = "hbh", | 189 | .name = "hbh", |
190 | .family = AF_INET6, | 190 | .family = NFPROTO_IPV6, |
191 | .match = hbh_mt6, | 191 | .match = hbh_mt6, |
192 | .matchsize = sizeof(struct ip6t_opts), | 192 | .matchsize = sizeof(struct ip6t_opts), |
193 | .checkentry = hbh_mt6_check, | 193 | .checkentry = hbh_mt6_check, |
@@ -196,7 +196,7 @@ static struct xt_match hbh_mt6_reg[] __read_mostly = { | |||
196 | }, | 196 | }, |
197 | { | 197 | { |
198 | .name = "dst", | 198 | .name = "dst", |
199 | .family = AF_INET6, | 199 | .family = NFPROTO_IPV6, |
200 | .match = hbh_mt6, | 200 | .match = hbh_mt6, |
201 | .matchsize = sizeof(struct ip6t_opts), | 201 | .matchsize = sizeof(struct ip6t_opts), |
202 | .checkentry = hbh_mt6_check, | 202 | .checkentry = hbh_mt6_check, |
diff --git a/net/ipv6/netfilter/ip6t_hl.c b/net/ipv6/netfilter/ip6t_hl.c index 345671673845..25c1eb92fac3 100644 --- a/net/ipv6/netfilter/ip6t_hl.c +++ b/net/ipv6/netfilter/ip6t_hl.c | |||
@@ -51,7 +51,7 @@ hl_mt6(const struct sk_buff *skb, const struct net_device *in, | |||
51 | 51 | ||
52 | static struct xt_match hl_mt6_reg __read_mostly = { | 52 | static struct xt_match hl_mt6_reg __read_mostly = { |
53 | .name = "hl", | 53 | .name = "hl", |
54 | .family = AF_INET6, | 54 | .family = NFPROTO_IPV6, |
55 | .match = hl_mt6, | 55 | .match = hl_mt6, |
56 | .matchsize = sizeof(struct ip6t_hl_info), | 56 | .matchsize = sizeof(struct ip6t_hl_info), |
57 | .me = THIS_MODULE, | 57 | .me = THIS_MODULE, |
diff --git a/net/ipv6/netfilter/ip6t_ipv6header.c b/net/ipv6/netfilter/ip6t_ipv6header.c index 317a8960a757..ef0661aacea7 100644 --- a/net/ipv6/netfilter/ip6t_ipv6header.c +++ b/net/ipv6/netfilter/ip6t_ipv6header.c | |||
@@ -138,7 +138,7 @@ ipv6header_mt6_check(const char *tablename, const void *ip, | |||
138 | 138 | ||
139 | static struct xt_match ipv6header_mt6_reg __read_mostly = { | 139 | static struct xt_match ipv6header_mt6_reg __read_mostly = { |
140 | .name = "ipv6header", | 140 | .name = "ipv6header", |
141 | .family = AF_INET6, | 141 | .family = NFPROTO_IPV6, |
142 | .match = ipv6header_mt6, | 142 | .match = ipv6header_mt6, |
143 | .matchsize = sizeof(struct ip6t_ipv6header_info), | 143 | .matchsize = sizeof(struct ip6t_ipv6header_info), |
144 | .checkentry = ipv6header_mt6_check, | 144 | .checkentry = ipv6header_mt6_check, |
diff --git a/net/ipv6/netfilter/ip6t_mh.c b/net/ipv6/netfilter/ip6t_mh.c index e06678d07ec8..dd876274ff6e 100644 --- a/net/ipv6/netfilter/ip6t_mh.c +++ b/net/ipv6/netfilter/ip6t_mh.c | |||
@@ -84,7 +84,7 @@ mh_mt6_check(const char *tablename, const void *entry, | |||
84 | 84 | ||
85 | static struct xt_match mh_mt6_reg __read_mostly = { | 85 | static struct xt_match mh_mt6_reg __read_mostly = { |
86 | .name = "mh", | 86 | .name = "mh", |
87 | .family = AF_INET6, | 87 | .family = NFPROTO_IPV6, |
88 | .checkentry = mh_mt6_check, | 88 | .checkentry = mh_mt6_check, |
89 | .match = mh_mt6, | 89 | .match = mh_mt6, |
90 | .matchsize = sizeof(struct ip6t_mh), | 90 | .matchsize = sizeof(struct ip6t_mh), |
diff --git a/net/ipv6/netfilter/ip6t_rt.c b/net/ipv6/netfilter/ip6t_rt.c index 81aaf7aaaabf..7c544ae591d8 100644 --- a/net/ipv6/netfilter/ip6t_rt.c +++ b/net/ipv6/netfilter/ip6t_rt.c | |||
@@ -214,7 +214,7 @@ rt_mt6_check(const char *tablename, const void *entry, | |||
214 | 214 | ||
215 | static struct xt_match rt_mt6_reg __read_mostly = { | 215 | static struct xt_match rt_mt6_reg __read_mostly = { |
216 | .name = "rt", | 216 | .name = "rt", |
217 | .family = AF_INET6, | 217 | .family = NFPROTO_IPV6, |
218 | .match = rt_mt6, | 218 | .match = rt_mt6, |
219 | .matchsize = sizeof(struct ip6t_rt), | 219 | .matchsize = sizeof(struct ip6t_rt), |
220 | .checkentry = rt_mt6_check, | 220 | .checkentry = rt_mt6_check, |
diff --git a/net/netfilter/xt_CLASSIFY.c b/net/netfilter/xt_CLASSIFY.c index 77a52bf83225..9d68da1748bb 100644 --- a/net/netfilter/xt_CLASSIFY.c +++ b/net/netfilter/xt_CLASSIFY.c | |||
@@ -39,7 +39,7 @@ classify_tg(struct sk_buff *skb, const struct net_device *in, | |||
39 | 39 | ||
40 | static struct xt_target classify_tg_reg[] __read_mostly = { | 40 | static struct xt_target classify_tg_reg[] __read_mostly = { |
41 | { | 41 | { |
42 | .family = AF_INET, | 42 | .family = NFPROTO_IPV4, |
43 | .name = "CLASSIFY", | 43 | .name = "CLASSIFY", |
44 | .target = classify_tg, | 44 | .target = classify_tg, |
45 | .targetsize = sizeof(struct xt_classify_target_info), | 45 | .targetsize = sizeof(struct xt_classify_target_info), |
@@ -51,7 +51,7 @@ static struct xt_target classify_tg_reg[] __read_mostly = { | |||
51 | }, | 51 | }, |
52 | { | 52 | { |
53 | .name = "CLASSIFY", | 53 | .name = "CLASSIFY", |
54 | .family = AF_INET6, | 54 | .family = NFPROTO_IPV6, |
55 | .target = classify_tg, | 55 | .target = classify_tg, |
56 | .targetsize = sizeof(struct xt_classify_target_info), | 56 | .targetsize = sizeof(struct xt_classify_target_info), |
57 | .table = "mangle", | 57 | .table = "mangle", |
diff --git a/net/netfilter/xt_CONNMARK.c b/net/netfilter/xt_CONNMARK.c index 5fecfb4794b1..e72e5d017525 100644 --- a/net/netfilter/xt_CONNMARK.c +++ b/net/netfilter/xt_CONNMARK.c | |||
@@ -197,7 +197,7 @@ static struct xt_target connmark_tg_reg[] __read_mostly = { | |||
197 | { | 197 | { |
198 | .name = "CONNMARK", | 198 | .name = "CONNMARK", |
199 | .revision = 0, | 199 | .revision = 0, |
200 | .family = AF_INET, | 200 | .family = NFPROTO_IPV4, |
201 | .checkentry = connmark_tg_check_v0, | 201 | .checkentry = connmark_tg_check_v0, |
202 | .destroy = connmark_tg_destroy, | 202 | .destroy = connmark_tg_destroy, |
203 | .target = connmark_tg_v0, | 203 | .target = connmark_tg_v0, |
@@ -212,7 +212,7 @@ static struct xt_target connmark_tg_reg[] __read_mostly = { | |||
212 | { | 212 | { |
213 | .name = "CONNMARK", | 213 | .name = "CONNMARK", |
214 | .revision = 0, | 214 | .revision = 0, |
215 | .family = AF_INET6, | 215 | .family = NFPROTO_IPV6, |
216 | .checkentry = connmark_tg_check_v0, | 216 | .checkentry = connmark_tg_check_v0, |
217 | .destroy = connmark_tg_destroy, | 217 | .destroy = connmark_tg_destroy, |
218 | .target = connmark_tg_v0, | 218 | .target = connmark_tg_v0, |
@@ -227,7 +227,7 @@ static struct xt_target connmark_tg_reg[] __read_mostly = { | |||
227 | { | 227 | { |
228 | .name = "CONNMARK", | 228 | .name = "CONNMARK", |
229 | .revision = 1, | 229 | .revision = 1, |
230 | .family = AF_INET, | 230 | .family = NFPROTO_IPV4, |
231 | .checkentry = connmark_tg_check, | 231 | .checkentry = connmark_tg_check, |
232 | .target = connmark_tg, | 232 | .target = connmark_tg, |
233 | .targetsize = sizeof(struct xt_connmark_tginfo1), | 233 | .targetsize = sizeof(struct xt_connmark_tginfo1), |
@@ -237,7 +237,7 @@ static struct xt_target connmark_tg_reg[] __read_mostly = { | |||
237 | { | 237 | { |
238 | .name = "CONNMARK", | 238 | .name = "CONNMARK", |
239 | .revision = 1, | 239 | .revision = 1, |
240 | .family = AF_INET6, | 240 | .family = NFPROTO_IPV6, |
241 | .checkentry = connmark_tg_check, | 241 | .checkentry = connmark_tg_check, |
242 | .target = connmark_tg, | 242 | .target = connmark_tg, |
243 | .targetsize = sizeof(struct xt_connmark_tginfo1), | 243 | .targetsize = sizeof(struct xt_connmark_tginfo1), |
diff --git a/net/netfilter/xt_CONNSECMARK.c b/net/netfilter/xt_CONNSECMARK.c index 76ca1f2421eb..ae939e54dfaa 100644 --- a/net/netfilter/xt_CONNSECMARK.c +++ b/net/netfilter/xt_CONNSECMARK.c | |||
@@ -127,7 +127,7 @@ connsecmark_tg_destroy(const struct xt_target *target, void *targinfo) | |||
127 | static struct xt_target connsecmark_tg_reg[] __read_mostly = { | 127 | static struct xt_target connsecmark_tg_reg[] __read_mostly = { |
128 | { | 128 | { |
129 | .name = "CONNSECMARK", | 129 | .name = "CONNSECMARK", |
130 | .family = AF_INET, | 130 | .family = NFPROTO_IPV4, |
131 | .checkentry = connsecmark_tg_check, | 131 | .checkentry = connsecmark_tg_check, |
132 | .destroy = connsecmark_tg_destroy, | 132 | .destroy = connsecmark_tg_destroy, |
133 | .target = connsecmark_tg, | 133 | .target = connsecmark_tg, |
@@ -136,7 +136,7 @@ static struct xt_target connsecmark_tg_reg[] __read_mostly = { | |||
136 | }, | 136 | }, |
137 | { | 137 | { |
138 | .name = "CONNSECMARK", | 138 | .name = "CONNSECMARK", |
139 | .family = AF_INET6, | 139 | .family = NFPROTO_IPV6, |
140 | .checkentry = connsecmark_tg_check, | 140 | .checkentry = connsecmark_tg_check, |
141 | .destroy = connsecmark_tg_destroy, | 141 | .destroy = connsecmark_tg_destroy, |
142 | .target = connsecmark_tg, | 142 | .target = connsecmark_tg, |
diff --git a/net/netfilter/xt_DSCP.c b/net/netfilter/xt_DSCP.c index 97efd74c04fe..f0b4958528e0 100644 --- a/net/netfilter/xt_DSCP.c +++ b/net/netfilter/xt_DSCP.c | |||
@@ -165,7 +165,7 @@ tos_tg6(struct sk_buff *skb, const struct net_device *in, | |||
165 | static struct xt_target dscp_tg_reg[] __read_mostly = { | 165 | static struct xt_target dscp_tg_reg[] __read_mostly = { |
166 | { | 166 | { |
167 | .name = "DSCP", | 167 | .name = "DSCP", |
168 | .family = AF_INET, | 168 | .family = NFPROTO_IPV4, |
169 | .checkentry = dscp_tg_check, | 169 | .checkentry = dscp_tg_check, |
170 | .target = dscp_tg, | 170 | .target = dscp_tg, |
171 | .targetsize = sizeof(struct xt_DSCP_info), | 171 | .targetsize = sizeof(struct xt_DSCP_info), |
@@ -174,7 +174,7 @@ static struct xt_target dscp_tg_reg[] __read_mostly = { | |||
174 | }, | 174 | }, |
175 | { | 175 | { |
176 | .name = "DSCP", | 176 | .name = "DSCP", |
177 | .family = AF_INET6, | 177 | .family = NFPROTO_IPV6, |
178 | .checkentry = dscp_tg_check, | 178 | .checkentry = dscp_tg_check, |
179 | .target = dscp_tg6, | 179 | .target = dscp_tg6, |
180 | .targetsize = sizeof(struct xt_DSCP_info), | 180 | .targetsize = sizeof(struct xt_DSCP_info), |
@@ -184,7 +184,7 @@ static struct xt_target dscp_tg_reg[] __read_mostly = { | |||
184 | { | 184 | { |
185 | .name = "TOS", | 185 | .name = "TOS", |
186 | .revision = 0, | 186 | .revision = 0, |
187 | .family = AF_INET, | 187 | .family = NFPROTO_IPV4, |
188 | .table = "mangle", | 188 | .table = "mangle", |
189 | .target = tos_tg_v0, | 189 | .target = tos_tg_v0, |
190 | .targetsize = sizeof(struct ipt_tos_target_info), | 190 | .targetsize = sizeof(struct ipt_tos_target_info), |
@@ -194,7 +194,7 @@ static struct xt_target dscp_tg_reg[] __read_mostly = { | |||
194 | { | 194 | { |
195 | .name = "TOS", | 195 | .name = "TOS", |
196 | .revision = 1, | 196 | .revision = 1, |
197 | .family = AF_INET, | 197 | .family = NFPROTO_IPV4, |
198 | .table = "mangle", | 198 | .table = "mangle", |
199 | .target = tos_tg, | 199 | .target = tos_tg, |
200 | .targetsize = sizeof(struct xt_tos_target_info), | 200 | .targetsize = sizeof(struct xt_tos_target_info), |
@@ -203,7 +203,7 @@ static struct xt_target dscp_tg_reg[] __read_mostly = { | |||
203 | { | 203 | { |
204 | .name = "TOS", | 204 | .name = "TOS", |
205 | .revision = 1, | 205 | .revision = 1, |
206 | .family = AF_INET6, | 206 | .family = NFPROTO_IPV6, |
207 | .table = "mangle", | 207 | .table = "mangle", |
208 | .target = tos_tg6, | 208 | .target = tos_tg6, |
209 | .targetsize = sizeof(struct xt_tos_target_info), | 209 | .targetsize = sizeof(struct xt_tos_target_info), |
diff --git a/net/netfilter/xt_MARK.c b/net/netfilter/xt_MARK.c index f9ce20b58981..55ef0796c76c 100644 --- a/net/netfilter/xt_MARK.c +++ b/net/netfilter/xt_MARK.c | |||
@@ -161,7 +161,7 @@ static int mark_tg_compat_to_user_v1(void __user *dst, void *src) | |||
161 | static struct xt_target mark_tg_reg[] __read_mostly = { | 161 | static struct xt_target mark_tg_reg[] __read_mostly = { |
162 | { | 162 | { |
163 | .name = "MARK", | 163 | .name = "MARK", |
164 | .family = AF_INET, | 164 | .family = NFPROTO_IPV4, |
165 | .revision = 0, | 165 | .revision = 0, |
166 | .checkentry = mark_tg_check_v0, | 166 | .checkentry = mark_tg_check_v0, |
167 | .target = mark_tg_v0, | 167 | .target = mark_tg_v0, |
@@ -176,7 +176,7 @@ static struct xt_target mark_tg_reg[] __read_mostly = { | |||
176 | }, | 176 | }, |
177 | { | 177 | { |
178 | .name = "MARK", | 178 | .name = "MARK", |
179 | .family = AF_INET, | 179 | .family = NFPROTO_IPV4, |
180 | .revision = 1, | 180 | .revision = 1, |
181 | .checkentry = mark_tg_check_v1, | 181 | .checkentry = mark_tg_check_v1, |
182 | .target = mark_tg_v1, | 182 | .target = mark_tg_v1, |
@@ -191,7 +191,7 @@ static struct xt_target mark_tg_reg[] __read_mostly = { | |||
191 | }, | 191 | }, |
192 | { | 192 | { |
193 | .name = "MARK", | 193 | .name = "MARK", |
194 | .family = AF_INET6, | 194 | .family = NFPROTO_IPV6, |
195 | .revision = 0, | 195 | .revision = 0, |
196 | .checkentry = mark_tg_check_v0, | 196 | .checkentry = mark_tg_check_v0, |
197 | .target = mark_tg_v0, | 197 | .target = mark_tg_v0, |
@@ -206,7 +206,7 @@ static struct xt_target mark_tg_reg[] __read_mostly = { | |||
206 | }, | 206 | }, |
207 | { | 207 | { |
208 | .name = "MARK", | 208 | .name = "MARK", |
209 | .family = AF_INET6, | 209 | .family = NFPROTO_IPV6, |
210 | .revision = 1, | 210 | .revision = 1, |
211 | .checkentry = mark_tg_check_v1, | 211 | .checkentry = mark_tg_check_v1, |
212 | .target = mark_tg_v1, | 212 | .target = mark_tg_v1, |
@@ -222,7 +222,7 @@ static struct xt_target mark_tg_reg[] __read_mostly = { | |||
222 | { | 222 | { |
223 | .name = "MARK", | 223 | .name = "MARK", |
224 | .revision = 2, | 224 | .revision = 2, |
225 | .family = AF_INET, | 225 | .family = NFPROTO_IPV4, |
226 | .target = mark_tg, | 226 | .target = mark_tg, |
227 | .targetsize = sizeof(struct xt_mark_tginfo2), | 227 | .targetsize = sizeof(struct xt_mark_tginfo2), |
228 | .me = THIS_MODULE, | 228 | .me = THIS_MODULE, |
@@ -230,7 +230,7 @@ static struct xt_target mark_tg_reg[] __read_mostly = { | |||
230 | { | 230 | { |
231 | .name = "MARK", | 231 | .name = "MARK", |
232 | .revision = 2, | 232 | .revision = 2, |
233 | .family = AF_INET6, | 233 | .family = NFPROTO_IPV6, |
234 | .target = mark_tg, | 234 | .target = mark_tg, |
235 | .targetsize = sizeof(struct xt_mark_tginfo2), | 235 | .targetsize = sizeof(struct xt_mark_tginfo2), |
236 | .me = THIS_MODULE, | 236 | .me = THIS_MODULE, |
diff --git a/net/netfilter/xt_NFLOG.c b/net/netfilter/xt_NFLOG.c index 19ae8efae655..9b0955201762 100644 --- a/net/netfilter/xt_NFLOG.c +++ b/net/netfilter/xt_NFLOG.c | |||
@@ -55,7 +55,7 @@ nflog_tg_check(const char *tablename, const void *entry, | |||
55 | static struct xt_target nflog_tg_reg[] __read_mostly = { | 55 | static struct xt_target nflog_tg_reg[] __read_mostly = { |
56 | { | 56 | { |
57 | .name = "NFLOG", | 57 | .name = "NFLOG", |
58 | .family = AF_INET, | 58 | .family = NFPROTO_IPV4, |
59 | .checkentry = nflog_tg_check, | 59 | .checkentry = nflog_tg_check, |
60 | .target = nflog_tg, | 60 | .target = nflog_tg, |
61 | .targetsize = sizeof(struct xt_nflog_info), | 61 | .targetsize = sizeof(struct xt_nflog_info), |
@@ -63,7 +63,7 @@ static struct xt_target nflog_tg_reg[] __read_mostly = { | |||
63 | }, | 63 | }, |
64 | { | 64 | { |
65 | .name = "NFLOG", | 65 | .name = "NFLOG", |
66 | .family = AF_INET6, | 66 | .family = NFPROTO_IPV6, |
67 | .checkentry = nflog_tg_check, | 67 | .checkentry = nflog_tg_check, |
68 | .target = nflog_tg, | 68 | .target = nflog_tg, |
69 | .targetsize = sizeof(struct xt_nflog_info), | 69 | .targetsize = sizeof(struct xt_nflog_info), |
diff --git a/net/netfilter/xt_NFQUEUE.c b/net/netfilter/xt_NFQUEUE.c index beb24d19a56f..c03c2e8d06fd 100644 --- a/net/netfilter/xt_NFQUEUE.c +++ b/net/netfilter/xt_NFQUEUE.c | |||
@@ -36,14 +36,14 @@ nfqueue_tg(struct sk_buff *skb, const struct net_device *in, | |||
36 | static struct xt_target nfqueue_tg_reg[] __read_mostly = { | 36 | static struct xt_target nfqueue_tg_reg[] __read_mostly = { |
37 | { | 37 | { |
38 | .name = "NFQUEUE", | 38 | .name = "NFQUEUE", |
39 | .family = AF_INET, | 39 | .family = NFPROTO_IPV4, |
40 | .target = nfqueue_tg, | 40 | .target = nfqueue_tg, |
41 | .targetsize = sizeof(struct xt_NFQ_info), | 41 | .targetsize = sizeof(struct xt_NFQ_info), |
42 | .me = THIS_MODULE, | 42 | .me = THIS_MODULE, |
43 | }, | 43 | }, |
44 | { | 44 | { |
45 | .name = "NFQUEUE", | 45 | .name = "NFQUEUE", |
46 | .family = AF_INET6, | 46 | .family = NFPROTO_IPV6, |
47 | .target = nfqueue_tg, | 47 | .target = nfqueue_tg, |
48 | .targetsize = sizeof(struct xt_NFQ_info), | 48 | .targetsize = sizeof(struct xt_NFQ_info), |
49 | .me = THIS_MODULE, | 49 | .me = THIS_MODULE, |
diff --git a/net/netfilter/xt_NOTRACK.c b/net/netfilter/xt_NOTRACK.c index 6c9de611eb8d..b9ee268b37c3 100644 --- a/net/netfilter/xt_NOTRACK.c +++ b/net/netfilter/xt_NOTRACK.c | |||
@@ -35,14 +35,14 @@ notrack_tg(struct sk_buff *skb, const struct net_device *in, | |||
35 | static struct xt_target notrack_tg_reg[] __read_mostly = { | 35 | static struct xt_target notrack_tg_reg[] __read_mostly = { |
36 | { | 36 | { |
37 | .name = "NOTRACK", | 37 | .name = "NOTRACK", |
38 | .family = AF_INET, | 38 | .family = NFPROTO_IPV4, |
39 | .target = notrack_tg, | 39 | .target = notrack_tg, |
40 | .table = "raw", | 40 | .table = "raw", |
41 | .me = THIS_MODULE, | 41 | .me = THIS_MODULE, |
42 | }, | 42 | }, |
43 | { | 43 | { |
44 | .name = "NOTRACK", | 44 | .name = "NOTRACK", |
45 | .family = AF_INET6, | 45 | .family = NFPROTO_IPV6, |
46 | .target = notrack_tg, | 46 | .target = notrack_tg, |
47 | .table = "raw", | 47 | .table = "raw", |
48 | .me = THIS_MODULE, | 48 | .me = THIS_MODULE, |
diff --git a/net/netfilter/xt_RATEEST.c b/net/netfilter/xt_RATEEST.c index 64d6ad380293..f7114fc5cfc2 100644 --- a/net/netfilter/xt_RATEEST.c +++ b/net/netfilter/xt_RATEEST.c | |||
@@ -159,7 +159,7 @@ static void xt_rateest_tg_destroy(const struct xt_target *target, | |||
159 | 159 | ||
160 | static struct xt_target xt_rateest_target[] __read_mostly = { | 160 | static struct xt_target xt_rateest_target[] __read_mostly = { |
161 | { | 161 | { |
162 | .family = AF_INET, | 162 | .family = NFPROTO_IPV4, |
163 | .name = "RATEEST", | 163 | .name = "RATEEST", |
164 | .target = xt_rateest_tg, | 164 | .target = xt_rateest_tg, |
165 | .checkentry = xt_rateest_tg_checkentry, | 165 | .checkentry = xt_rateest_tg_checkentry, |
@@ -168,7 +168,7 @@ static struct xt_target xt_rateest_target[] __read_mostly = { | |||
168 | .me = THIS_MODULE, | 168 | .me = THIS_MODULE, |
169 | }, | 169 | }, |
170 | { | 170 | { |
171 | .family = AF_INET6, | 171 | .family = NFPROTO_IPV6, |
172 | .name = "RATEEST", | 172 | .name = "RATEEST", |
173 | .target = xt_rateest_tg, | 173 | .target = xt_rateest_tg, |
174 | .checkentry = xt_rateest_tg_checkentry, | 174 | .checkentry = xt_rateest_tg_checkentry, |
diff --git a/net/netfilter/xt_SECMARK.c b/net/netfilter/xt_SECMARK.c index 94f87ee7552b..8f8f57b93a61 100644 --- a/net/netfilter/xt_SECMARK.c +++ b/net/netfilter/xt_SECMARK.c | |||
@@ -128,7 +128,7 @@ static void secmark_tg_destroy(const struct xt_target *target, void *targinfo) | |||
128 | static struct xt_target secmark_tg_reg[] __read_mostly = { | 128 | static struct xt_target secmark_tg_reg[] __read_mostly = { |
129 | { | 129 | { |
130 | .name = "SECMARK", | 130 | .name = "SECMARK", |
131 | .family = AF_INET, | 131 | .family = NFPROTO_IPV4, |
132 | .checkentry = secmark_tg_check, | 132 | .checkentry = secmark_tg_check, |
133 | .destroy = secmark_tg_destroy, | 133 | .destroy = secmark_tg_destroy, |
134 | .target = secmark_tg, | 134 | .target = secmark_tg, |
@@ -137,7 +137,7 @@ static struct xt_target secmark_tg_reg[] __read_mostly = { | |||
137 | }, | 137 | }, |
138 | { | 138 | { |
139 | .name = "SECMARK", | 139 | .name = "SECMARK", |
140 | .family = AF_INET6, | 140 | .family = NFPROTO_IPV6, |
141 | .checkentry = secmark_tg_check, | 141 | .checkentry = secmark_tg_check, |
142 | .destroy = secmark_tg_destroy, | 142 | .destroy = secmark_tg_destroy, |
143 | .target = secmark_tg, | 143 | .target = secmark_tg, |
diff --git a/net/netfilter/xt_TCPMSS.c b/net/netfilter/xt_TCPMSS.c index beb5094703cb..b868f9952398 100644 --- a/net/netfilter/xt_TCPMSS.c +++ b/net/netfilter/xt_TCPMSS.c | |||
@@ -289,7 +289,7 @@ tcpmss_tg6_check(const char *tablename, const void *entry, | |||
289 | 289 | ||
290 | static struct xt_target tcpmss_tg_reg[] __read_mostly = { | 290 | static struct xt_target tcpmss_tg_reg[] __read_mostly = { |
291 | { | 291 | { |
292 | .family = AF_INET, | 292 | .family = NFPROTO_IPV4, |
293 | .name = "TCPMSS", | 293 | .name = "TCPMSS", |
294 | .checkentry = tcpmss_tg4_check, | 294 | .checkentry = tcpmss_tg4_check, |
295 | .target = tcpmss_tg4, | 295 | .target = tcpmss_tg4, |
@@ -299,7 +299,7 @@ static struct xt_target tcpmss_tg_reg[] __read_mostly = { | |||
299 | }, | 299 | }, |
300 | #if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE) | 300 | #if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE) |
301 | { | 301 | { |
302 | .family = AF_INET6, | 302 | .family = NFPROTO_IPV6, |
303 | .name = "TCPMSS", | 303 | .name = "TCPMSS", |
304 | .checkentry = tcpmss_tg6_check, | 304 | .checkentry = tcpmss_tg6_check, |
305 | .target = tcpmss_tg6, | 305 | .target = tcpmss_tg6, |
diff --git a/net/netfilter/xt_TCPOPTSTRIP.c b/net/netfilter/xt_TCPOPTSTRIP.c index 9685b6fcbc81..2e0ae6cc5d95 100644 --- a/net/netfilter/xt_TCPOPTSTRIP.c +++ b/net/netfilter/xt_TCPOPTSTRIP.c | |||
@@ -106,7 +106,7 @@ tcpoptstrip_tg6(struct sk_buff *skb, const struct net_device *in, | |||
106 | static struct xt_target tcpoptstrip_tg_reg[] __read_mostly = { | 106 | static struct xt_target tcpoptstrip_tg_reg[] __read_mostly = { |
107 | { | 107 | { |
108 | .name = "TCPOPTSTRIP", | 108 | .name = "TCPOPTSTRIP", |
109 | .family = AF_INET, | 109 | .family = NFPROTO_IPV4, |
110 | .table = "mangle", | 110 | .table = "mangle", |
111 | .proto = IPPROTO_TCP, | 111 | .proto = IPPROTO_TCP, |
112 | .target = tcpoptstrip_tg4, | 112 | .target = tcpoptstrip_tg4, |
@@ -116,7 +116,7 @@ static struct xt_target tcpoptstrip_tg_reg[] __read_mostly = { | |||
116 | #if defined(CONFIG_IP6_NF_MANGLE) || defined(CONFIG_IP6_NF_MANGLE_MODULE) | 116 | #if defined(CONFIG_IP6_NF_MANGLE) || defined(CONFIG_IP6_NF_MANGLE_MODULE) |
117 | { | 117 | { |
118 | .name = "TCPOPTSTRIP", | 118 | .name = "TCPOPTSTRIP", |
119 | .family = AF_INET6, | 119 | .family = NFPROTO_IPV6, |
120 | .table = "mangle", | 120 | .table = "mangle", |
121 | .proto = IPPROTO_TCP, | 121 | .proto = IPPROTO_TCP, |
122 | .target = tcpoptstrip_tg6, | 122 | .target = tcpoptstrip_tg6, |
diff --git a/net/netfilter/xt_TRACE.c b/net/netfilter/xt_TRACE.c index 30dab79a3438..e1bcad57914e 100644 --- a/net/netfilter/xt_TRACE.c +++ b/net/netfilter/xt_TRACE.c | |||
@@ -22,14 +22,14 @@ trace_tg(struct sk_buff *skb, const struct net_device *in, | |||
22 | static struct xt_target trace_tg_reg[] __read_mostly = { | 22 | static struct xt_target trace_tg_reg[] __read_mostly = { |
23 | { | 23 | { |
24 | .name = "TRACE", | 24 | .name = "TRACE", |
25 | .family = AF_INET, | 25 | .family = NFPROTO_IPV4, |
26 | .target = trace_tg, | 26 | .target = trace_tg, |
27 | .table = "raw", | 27 | .table = "raw", |
28 | .me = THIS_MODULE, | 28 | .me = THIS_MODULE, |
29 | }, | 29 | }, |
30 | { | 30 | { |
31 | .name = "TRACE", | 31 | .name = "TRACE", |
32 | .family = AF_INET6, | 32 | .family = NFPROTO_IPV6, |
33 | .target = trace_tg, | 33 | .target = trace_tg, |
34 | .table = "raw", | 34 | .table = "raw", |
35 | .me = THIS_MODULE, | 35 | .me = THIS_MODULE, |
diff --git a/net/netfilter/xt_comment.c b/net/netfilter/xt_comment.c index 89f47364e848..fa211b2ab874 100644 --- a/net/netfilter/xt_comment.c +++ b/net/netfilter/xt_comment.c | |||
@@ -28,14 +28,14 @@ comment_mt(const struct sk_buff *skb, const struct net_device *in, | |||
28 | static struct xt_match comment_mt_reg[] __read_mostly = { | 28 | static struct xt_match comment_mt_reg[] __read_mostly = { |
29 | { | 29 | { |
30 | .name = "comment", | 30 | .name = "comment", |
31 | .family = AF_INET, | 31 | .family = NFPROTO_IPV4, |
32 | .match = comment_mt, | 32 | .match = comment_mt, |
33 | .matchsize = sizeof(struct xt_comment_info), | 33 | .matchsize = sizeof(struct xt_comment_info), |
34 | .me = THIS_MODULE | 34 | .me = THIS_MODULE |
35 | }, | 35 | }, |
36 | { | 36 | { |
37 | .name = "comment", | 37 | .name = "comment", |
38 | .family = AF_INET6, | 38 | .family = NFPROTO_IPV6, |
39 | .match = comment_mt, | 39 | .match = comment_mt, |
40 | .matchsize = sizeof(struct xt_comment_info), | 40 | .matchsize = sizeof(struct xt_comment_info), |
41 | .me = THIS_MODULE | 41 | .me = THIS_MODULE |
diff --git a/net/netfilter/xt_connbytes.c b/net/netfilter/xt_connbytes.c index 3e39c4fe1931..d2cd22a49c96 100644 --- a/net/netfilter/xt_connbytes.c +++ b/net/netfilter/xt_connbytes.c | |||
@@ -130,7 +130,7 @@ connbytes_mt_destroy(const struct xt_match *match, void *matchinfo) | |||
130 | static struct xt_match connbytes_mt_reg[] __read_mostly = { | 130 | static struct xt_match connbytes_mt_reg[] __read_mostly = { |
131 | { | 131 | { |
132 | .name = "connbytes", | 132 | .name = "connbytes", |
133 | .family = AF_INET, | 133 | .family = NFPROTO_IPV4, |
134 | .checkentry = connbytes_mt_check, | 134 | .checkentry = connbytes_mt_check, |
135 | .match = connbytes_mt, | 135 | .match = connbytes_mt, |
136 | .destroy = connbytes_mt_destroy, | 136 | .destroy = connbytes_mt_destroy, |
@@ -139,7 +139,7 @@ static struct xt_match connbytes_mt_reg[] __read_mostly = { | |||
139 | }, | 139 | }, |
140 | { | 140 | { |
141 | .name = "connbytes", | 141 | .name = "connbytes", |
142 | .family = AF_INET6, | 142 | .family = NFPROTO_IPV6, |
143 | .checkentry = connbytes_mt_check, | 143 | .checkentry = connbytes_mt_check, |
144 | .match = connbytes_mt, | 144 | .match = connbytes_mt, |
145 | .destroy = connbytes_mt_destroy, | 145 | .destroy = connbytes_mt_destroy, |
diff --git a/net/netfilter/xt_connlimit.c b/net/netfilter/xt_connlimit.c index 1655e2cf25c4..d2453d182d68 100644 --- a/net/netfilter/xt_connlimit.c +++ b/net/netfilter/xt_connlimit.c | |||
@@ -84,7 +84,7 @@ same_source_net(const union nf_inet_addr *addr, | |||
84 | const union nf_inet_addr *mask, | 84 | const union nf_inet_addr *mask, |
85 | const union nf_inet_addr *u3, u_int8_t family) | 85 | const union nf_inet_addr *u3, u_int8_t family) |
86 | { | 86 | { |
87 | if (family == AF_INET) { | 87 | if (family == NFPROTO_IPV4) { |
88 | return (addr->ip & mask->ip) == (u3->ip & mask->ip); | 88 | return (addr->ip & mask->ip) == (u3->ip & mask->ip); |
89 | } else { | 89 | } else { |
90 | union nf_inet_addr lh, rh; | 90 | union nf_inet_addr lh, rh; |
@@ -114,7 +114,7 @@ static int count_them(struct xt_connlimit_data *data, | |||
114 | int matches = 0; | 114 | int matches = 0; |
115 | 115 | ||
116 | 116 | ||
117 | if (match->family == AF_INET6) | 117 | if (match->family == NFPROTO_IPV6) |
118 | hash = &data->iphash[connlimit_iphash6(addr, mask)]; | 118 | hash = &data->iphash[connlimit_iphash6(addr, mask)]; |
119 | else | 119 | else |
120 | hash = &data->iphash[connlimit_iphash(addr->ip & mask->ip)]; | 120 | hash = &data->iphash[connlimit_iphash(addr->ip & mask->ip)]; |
@@ -198,7 +198,7 @@ connlimit_mt(const struct sk_buff *skb, const struct net_device *in, | |||
198 | match->family, &tuple)) | 198 | match->family, &tuple)) |
199 | goto hotdrop; | 199 | goto hotdrop; |
200 | 200 | ||
201 | if (match->family == AF_INET6) { | 201 | if (match->family == NFPROTO_IPV6) { |
202 | const struct ipv6hdr *iph = ipv6_hdr(skb); | 202 | const struct ipv6hdr *iph = ipv6_hdr(skb); |
203 | memcpy(&addr.ip6, &iph->saddr, sizeof(iph->saddr)); | 203 | memcpy(&addr.ip6, &iph->saddr, sizeof(iph->saddr)); |
204 | } else { | 204 | } else { |
@@ -276,7 +276,7 @@ connlimit_mt_destroy(const struct xt_match *match, void *matchinfo) | |||
276 | static struct xt_match connlimit_mt_reg[] __read_mostly = { | 276 | static struct xt_match connlimit_mt_reg[] __read_mostly = { |
277 | { | 277 | { |
278 | .name = "connlimit", | 278 | .name = "connlimit", |
279 | .family = AF_INET, | 279 | .family = NFPROTO_IPV4, |
280 | .checkentry = connlimit_mt_check, | 280 | .checkentry = connlimit_mt_check, |
281 | .match = connlimit_mt, | 281 | .match = connlimit_mt, |
282 | .matchsize = sizeof(struct xt_connlimit_info), | 282 | .matchsize = sizeof(struct xt_connlimit_info), |
@@ -285,7 +285,7 @@ static struct xt_match connlimit_mt_reg[] __read_mostly = { | |||
285 | }, | 285 | }, |
286 | { | 286 | { |
287 | .name = "connlimit", | 287 | .name = "connlimit", |
288 | .family = AF_INET6, | 288 | .family = NFPROTO_IPV6, |
289 | .checkentry = connlimit_mt_check, | 289 | .checkentry = connlimit_mt_check, |
290 | .match = connlimit_mt, | 290 | .match = connlimit_mt, |
291 | .matchsize = sizeof(struct xt_connlimit_info), | 291 | .matchsize = sizeof(struct xt_connlimit_info), |
diff --git a/net/netfilter/xt_connmark.c b/net/netfilter/xt_connmark.c index aaa1b96691f9..0577b8ff4e1e 100644 --- a/net/netfilter/xt_connmark.c +++ b/net/netfilter/xt_connmark.c | |||
@@ -140,7 +140,7 @@ static struct xt_match connmark_mt_reg[] __read_mostly = { | |||
140 | { | 140 | { |
141 | .name = "connmark", | 141 | .name = "connmark", |
142 | .revision = 0, | 142 | .revision = 0, |
143 | .family = AF_INET, | 143 | .family = NFPROTO_IPV4, |
144 | .checkentry = connmark_mt_check_v0, | 144 | .checkentry = connmark_mt_check_v0, |
145 | .match = connmark_mt_v0, | 145 | .match = connmark_mt_v0, |
146 | .destroy = connmark_mt_destroy, | 146 | .destroy = connmark_mt_destroy, |
@@ -155,7 +155,7 @@ static struct xt_match connmark_mt_reg[] __read_mostly = { | |||
155 | { | 155 | { |
156 | .name = "connmark", | 156 | .name = "connmark", |
157 | .revision = 0, | 157 | .revision = 0, |
158 | .family = AF_INET6, | 158 | .family = NFPROTO_IPV6, |
159 | .checkentry = connmark_mt_check_v0, | 159 | .checkentry = connmark_mt_check_v0, |
160 | .match = connmark_mt_v0, | 160 | .match = connmark_mt_v0, |
161 | .destroy = connmark_mt_destroy, | 161 | .destroy = connmark_mt_destroy, |
@@ -170,7 +170,7 @@ static struct xt_match connmark_mt_reg[] __read_mostly = { | |||
170 | { | 170 | { |
171 | .name = "connmark", | 171 | .name = "connmark", |
172 | .revision = 1, | 172 | .revision = 1, |
173 | .family = AF_INET, | 173 | .family = NFPROTO_IPV4, |
174 | .checkentry = connmark_mt_check, | 174 | .checkentry = connmark_mt_check, |
175 | .match = connmark_mt, | 175 | .match = connmark_mt, |
176 | .matchsize = sizeof(struct xt_connmark_mtinfo1), | 176 | .matchsize = sizeof(struct xt_connmark_mtinfo1), |
@@ -180,7 +180,7 @@ static struct xt_match connmark_mt_reg[] __read_mostly = { | |||
180 | { | 180 | { |
181 | .name = "connmark", | 181 | .name = "connmark", |
182 | .revision = 1, | 182 | .revision = 1, |
183 | .family = AF_INET6, | 183 | .family = NFPROTO_IPV6, |
184 | .checkentry = connmark_mt_check, | 184 | .checkentry = connmark_mt_check, |
185 | .match = connmark_mt, | 185 | .match = connmark_mt, |
186 | .matchsize = sizeof(struct xt_connmark_mtinfo1), | 186 | .matchsize = sizeof(struct xt_connmark_mtinfo1), |
diff --git a/net/netfilter/xt_conntrack.c b/net/netfilter/xt_conntrack.c index 28a42a3fbff7..392b457f9c22 100644 --- a/net/netfilter/xt_conntrack.c +++ b/net/netfilter/xt_conntrack.c | |||
@@ -121,9 +121,9 @@ conntrack_addrcmp(const union nf_inet_addr *kaddr, | |||
121 | const union nf_inet_addr *uaddr, | 121 | const union nf_inet_addr *uaddr, |
122 | const union nf_inet_addr *umask, unsigned int l3proto) | 122 | const union nf_inet_addr *umask, unsigned int l3proto) |
123 | { | 123 | { |
124 | if (l3proto == AF_INET) | 124 | if (l3proto == NFPROTO_IPV4) |
125 | return ((kaddr->ip ^ uaddr->ip) & umask->ip) == 0; | 125 | return ((kaddr->ip ^ uaddr->ip) & umask->ip) == 0; |
126 | else if (l3proto == AF_INET6) | 126 | else if (l3proto == NFPROTO_IPV6) |
127 | return ipv6_masked_addr_cmp(&kaddr->in6, &umask->in6, | 127 | return ipv6_masked_addr_cmp(&kaddr->in6, &umask->in6, |
128 | &uaddr->in6) == 0; | 128 | &uaddr->in6) == 0; |
129 | else | 129 | else |
@@ -356,7 +356,7 @@ static struct xt_match conntrack_mt_reg[] __read_mostly = { | |||
356 | { | 356 | { |
357 | .name = "conntrack", | 357 | .name = "conntrack", |
358 | .revision = 0, | 358 | .revision = 0, |
359 | .family = AF_INET, | 359 | .family = NFPROTO_IPV4, |
360 | .match = conntrack_mt_v0, | 360 | .match = conntrack_mt_v0, |
361 | .checkentry = conntrack_mt_check, | 361 | .checkentry = conntrack_mt_check, |
362 | .destroy = conntrack_mt_destroy, | 362 | .destroy = conntrack_mt_destroy, |
@@ -371,7 +371,7 @@ static struct xt_match conntrack_mt_reg[] __read_mostly = { | |||
371 | { | 371 | { |
372 | .name = "conntrack", | 372 | .name = "conntrack", |
373 | .revision = 1, | 373 | .revision = 1, |
374 | .family = AF_INET, | 374 | .family = NFPROTO_IPV4, |
375 | .matchsize = sizeof(struct xt_conntrack_mtinfo1), | 375 | .matchsize = sizeof(struct xt_conntrack_mtinfo1), |
376 | .match = conntrack_mt, | 376 | .match = conntrack_mt, |
377 | .checkentry = conntrack_mt_check, | 377 | .checkentry = conntrack_mt_check, |
@@ -381,7 +381,7 @@ static struct xt_match conntrack_mt_reg[] __read_mostly = { | |||
381 | { | 381 | { |
382 | .name = "conntrack", | 382 | .name = "conntrack", |
383 | .revision = 1, | 383 | .revision = 1, |
384 | .family = AF_INET6, | 384 | .family = NFPROTO_IPV6, |
385 | .matchsize = sizeof(struct xt_conntrack_mtinfo1), | 385 | .matchsize = sizeof(struct xt_conntrack_mtinfo1), |
386 | .match = conntrack_mt, | 386 | .match = conntrack_mt, |
387 | .checkentry = conntrack_mt_check, | 387 | .checkentry = conntrack_mt_check, |
diff --git a/net/netfilter/xt_dccp.c b/net/netfilter/xt_dccp.c index 8b6522186d9f..87971f47132d 100644 --- a/net/netfilter/xt_dccp.c +++ b/net/netfilter/xt_dccp.c | |||
@@ -138,7 +138,7 @@ dccp_mt_check(const char *tablename, const void *inf, | |||
138 | static struct xt_match dccp_mt_reg[] __read_mostly = { | 138 | static struct xt_match dccp_mt_reg[] __read_mostly = { |
139 | { | 139 | { |
140 | .name = "dccp", | 140 | .name = "dccp", |
141 | .family = AF_INET, | 141 | .family = NFPROTO_IPV4, |
142 | .checkentry = dccp_mt_check, | 142 | .checkentry = dccp_mt_check, |
143 | .match = dccp_mt, | 143 | .match = dccp_mt, |
144 | .matchsize = sizeof(struct xt_dccp_info), | 144 | .matchsize = sizeof(struct xt_dccp_info), |
@@ -147,7 +147,7 @@ static struct xt_match dccp_mt_reg[] __read_mostly = { | |||
147 | }, | 147 | }, |
148 | { | 148 | { |
149 | .name = "dccp", | 149 | .name = "dccp", |
150 | .family = AF_INET6, | 150 | .family = NFPROTO_IPV6, |
151 | .checkentry = dccp_mt_check, | 151 | .checkentry = dccp_mt_check, |
152 | .match = dccp_mt, | 152 | .match = dccp_mt, |
153 | .matchsize = sizeof(struct xt_dccp_info), | 153 | .matchsize = sizeof(struct xt_dccp_info), |
diff --git a/net/netfilter/xt_dscp.c b/net/netfilter/xt_dscp.c index 26f4aab9c429..7f03aa13a955 100644 --- a/net/netfilter/xt_dscp.c +++ b/net/netfilter/xt_dscp.c | |||
@@ -80,7 +80,7 @@ static bool tos_mt(const struct sk_buff *skb, const struct net_device *in, | |||
80 | { | 80 | { |
81 | const struct xt_tos_match_info *info = matchinfo; | 81 | const struct xt_tos_match_info *info = matchinfo; |
82 | 82 | ||
83 | if (match->family == AF_INET) | 83 | if (match->family == NFPROTO_IPV4) |
84 | return ((ip_hdr(skb)->tos & info->tos_mask) == | 84 | return ((ip_hdr(skb)->tos & info->tos_mask) == |
85 | info->tos_value) ^ !!info->invert; | 85 | info->tos_value) ^ !!info->invert; |
86 | else | 86 | else |
@@ -91,7 +91,7 @@ static bool tos_mt(const struct sk_buff *skb, const struct net_device *in, | |||
91 | static struct xt_match dscp_mt_reg[] __read_mostly = { | 91 | static struct xt_match dscp_mt_reg[] __read_mostly = { |
92 | { | 92 | { |
93 | .name = "dscp", | 93 | .name = "dscp", |
94 | .family = AF_INET, | 94 | .family = NFPROTO_IPV4, |
95 | .checkentry = dscp_mt_check, | 95 | .checkentry = dscp_mt_check, |
96 | .match = dscp_mt, | 96 | .match = dscp_mt, |
97 | .matchsize = sizeof(struct xt_dscp_info), | 97 | .matchsize = sizeof(struct xt_dscp_info), |
@@ -99,7 +99,7 @@ static struct xt_match dscp_mt_reg[] __read_mostly = { | |||
99 | }, | 99 | }, |
100 | { | 100 | { |
101 | .name = "dscp", | 101 | .name = "dscp", |
102 | .family = AF_INET6, | 102 | .family = NFPROTO_IPV6, |
103 | .checkentry = dscp_mt_check, | 103 | .checkentry = dscp_mt_check, |
104 | .match = dscp_mt6, | 104 | .match = dscp_mt6, |
105 | .matchsize = sizeof(struct xt_dscp_info), | 105 | .matchsize = sizeof(struct xt_dscp_info), |
@@ -108,7 +108,7 @@ static struct xt_match dscp_mt_reg[] __read_mostly = { | |||
108 | { | 108 | { |
109 | .name = "tos", | 109 | .name = "tos", |
110 | .revision = 0, | 110 | .revision = 0, |
111 | .family = AF_INET, | 111 | .family = NFPROTO_IPV4, |
112 | .match = tos_mt_v0, | 112 | .match = tos_mt_v0, |
113 | .matchsize = sizeof(struct ipt_tos_info), | 113 | .matchsize = sizeof(struct ipt_tos_info), |
114 | .me = THIS_MODULE, | 114 | .me = THIS_MODULE, |
@@ -116,7 +116,7 @@ static struct xt_match dscp_mt_reg[] __read_mostly = { | |||
116 | { | 116 | { |
117 | .name = "tos", | 117 | .name = "tos", |
118 | .revision = 1, | 118 | .revision = 1, |
119 | .family = AF_INET, | 119 | .family = NFPROTO_IPV4, |
120 | .match = tos_mt, | 120 | .match = tos_mt, |
121 | .matchsize = sizeof(struct xt_tos_match_info), | 121 | .matchsize = sizeof(struct xt_tos_match_info), |
122 | .me = THIS_MODULE, | 122 | .me = THIS_MODULE, |
@@ -124,7 +124,7 @@ static struct xt_match dscp_mt_reg[] __read_mostly = { | |||
124 | { | 124 | { |
125 | .name = "tos", | 125 | .name = "tos", |
126 | .revision = 1, | 126 | .revision = 1, |
127 | .family = AF_INET6, | 127 | .family = NFPROTO_IPV6, |
128 | .match = tos_mt, | 128 | .match = tos_mt, |
129 | .matchsize = sizeof(struct xt_tos_match_info), | 129 | .matchsize = sizeof(struct xt_tos_match_info), |
130 | .me = THIS_MODULE, | 130 | .me = THIS_MODULE, |
diff --git a/net/netfilter/xt_esp.c b/net/netfilter/xt_esp.c index a133eb9b23e1..045c4deecafc 100644 --- a/net/netfilter/xt_esp.c +++ b/net/netfilter/xt_esp.c | |||
@@ -88,7 +88,7 @@ esp_mt_check(const char *tablename, const void *ip_void, | |||
88 | static struct xt_match esp_mt_reg[] __read_mostly = { | 88 | static struct xt_match esp_mt_reg[] __read_mostly = { |
89 | { | 89 | { |
90 | .name = "esp", | 90 | .name = "esp", |
91 | .family = AF_INET, | 91 | .family = NFPROTO_IPV4, |
92 | .checkentry = esp_mt_check, | 92 | .checkentry = esp_mt_check, |
93 | .match = esp_mt, | 93 | .match = esp_mt, |
94 | .matchsize = sizeof(struct xt_esp), | 94 | .matchsize = sizeof(struct xt_esp), |
@@ -97,7 +97,7 @@ static struct xt_match esp_mt_reg[] __read_mostly = { | |||
97 | }, | 97 | }, |
98 | { | 98 | { |
99 | .name = "esp", | 99 | .name = "esp", |
100 | .family = AF_INET6, | 100 | .family = NFPROTO_IPV6, |
101 | .checkentry = esp_mt_check, | 101 | .checkentry = esp_mt_check, |
102 | .match = esp_mt, | 102 | .match = esp_mt, |
103 | .matchsize = sizeof(struct xt_esp), | 103 | .matchsize = sizeof(struct xt_esp), |
diff --git a/net/netfilter/xt_hashlimit.c b/net/netfilter/xt_hashlimit.c index 0c9268fd2e10..7bae369603d7 100644 --- a/net/netfilter/xt_hashlimit.c +++ b/net/netfilter/xt_hashlimit.c | |||
@@ -218,7 +218,7 @@ static int htable_create_v0(struct xt_hashlimit_info *minfo, u_int8_t family) | |||
218 | hinfo->cfg.gc_interval = minfo->cfg.gc_interval; | 218 | hinfo->cfg.gc_interval = minfo->cfg.gc_interval; |
219 | hinfo->cfg.expire = minfo->cfg.expire; | 219 | hinfo->cfg.expire = minfo->cfg.expire; |
220 | 220 | ||
221 | if (family == AF_INET) | 221 | if (family == NFPROTO_IPV4) |
222 | hinfo->cfg.srcmask = hinfo->cfg.dstmask = 32; | 222 | hinfo->cfg.srcmask = hinfo->cfg.dstmask = 32; |
223 | else | 223 | else |
224 | hinfo->cfg.srcmask = hinfo->cfg.dstmask = 128; | 224 | hinfo->cfg.srcmask = hinfo->cfg.dstmask = 128; |
@@ -237,11 +237,10 @@ static int htable_create_v0(struct xt_hashlimit_info *minfo, u_int8_t family) | |||
237 | hinfo->family = family; | 237 | hinfo->family = family; |
238 | hinfo->rnd_initialized = 0; | 238 | hinfo->rnd_initialized = 0; |
239 | spin_lock_init(&hinfo->lock); | 239 | spin_lock_init(&hinfo->lock); |
240 | hinfo->pde = | 240 | hinfo->pde = proc_create_data(minfo->name, 0, |
241 | proc_create_data(minfo->name, 0, | 241 | (family == NFPROTO_IPV4) ? |
242 | family == AF_INET ? hashlimit_procdir4 : | 242 | hashlimit_procdir4 : hashlimit_procdir6, |
243 | hashlimit_procdir6, | 243 | &dl_file_ops, hinfo); |
244 | &dl_file_ops, hinfo); | ||
245 | if (!hinfo->pde) { | 244 | if (!hinfo->pde) { |
246 | vfree(hinfo); | 245 | vfree(hinfo); |
247 | return -1; | 246 | return -1; |
@@ -300,11 +299,10 @@ static int htable_create(struct xt_hashlimit_mtinfo1 *minfo, u_int8_t family) | |||
300 | hinfo->rnd_initialized = 0; | 299 | hinfo->rnd_initialized = 0; |
301 | spin_lock_init(&hinfo->lock); | 300 | spin_lock_init(&hinfo->lock); |
302 | 301 | ||
303 | hinfo->pde = | 302 | hinfo->pde = proc_create_data(minfo->name, 0, |
304 | proc_create_data(minfo->name, 0, | 303 | (family == NFPROTO_IPV4) ? |
305 | family == AF_INET ? hashlimit_procdir4 : | 304 | hashlimit_procdir4 : hashlimit_procdir6, |
306 | hashlimit_procdir6, | 305 | &dl_file_ops, hinfo); |
307 | &dl_file_ops, hinfo); | ||
308 | if (hinfo->pde == NULL) { | 306 | if (hinfo->pde == NULL) { |
309 | vfree(hinfo); | 307 | vfree(hinfo); |
310 | return -1; | 308 | return -1; |
@@ -370,7 +368,7 @@ static void htable_destroy(struct xt_hashlimit_htable *hinfo) | |||
370 | 368 | ||
371 | /* remove proc entry */ | 369 | /* remove proc entry */ |
372 | remove_proc_entry(hinfo->pde->name, | 370 | remove_proc_entry(hinfo->pde->name, |
373 | hinfo->family == AF_INET ? hashlimit_procdir4 : | 371 | hinfo->family == NFPROTO_IPV4 ? hashlimit_procdir4 : |
374 | hashlimit_procdir6); | 372 | hashlimit_procdir6); |
375 | htable_selective_cleanup(hinfo, select_all); | 373 | htable_selective_cleanup(hinfo, select_all); |
376 | vfree(hinfo); | 374 | vfree(hinfo); |
@@ -501,7 +499,7 @@ hashlimit_init_dst(const struct xt_hashlimit_htable *hinfo, | |||
501 | memset(dst, 0, sizeof(*dst)); | 499 | memset(dst, 0, sizeof(*dst)); |
502 | 500 | ||
503 | switch (hinfo->family) { | 501 | switch (hinfo->family) { |
504 | case AF_INET: | 502 | case NFPROTO_IPV4: |
505 | if (hinfo->cfg.mode & XT_HASHLIMIT_HASH_DIP) | 503 | if (hinfo->cfg.mode & XT_HASHLIMIT_HASH_DIP) |
506 | dst->ip.dst = maskl(ip_hdr(skb)->daddr, | 504 | dst->ip.dst = maskl(ip_hdr(skb)->daddr, |
507 | hinfo->cfg.dstmask); | 505 | hinfo->cfg.dstmask); |
@@ -515,7 +513,7 @@ hashlimit_init_dst(const struct xt_hashlimit_htable *hinfo, | |||
515 | nexthdr = ip_hdr(skb)->protocol; | 513 | nexthdr = ip_hdr(skb)->protocol; |
516 | break; | 514 | break; |
517 | #if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE) | 515 | #if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE) |
518 | case AF_INET6: | 516 | case NFPROTO_IPV6: |
519 | if (hinfo->cfg.mode & XT_HASHLIMIT_HASH_DIP) { | 517 | if (hinfo->cfg.mode & XT_HASHLIMIT_HASH_DIP) { |
520 | memcpy(&dst->ip6.dst, &ipv6_hdr(skb)->daddr, | 518 | memcpy(&dst->ip6.dst, &ipv6_hdr(skb)->daddr, |
521 | sizeof(dst->ip6.dst)); | 519 | sizeof(dst->ip6.dst)); |
@@ -737,7 +735,7 @@ hashlimit_mt_check(const char *tablename, const void *inf, | |||
737 | return false; | 735 | return false; |
738 | if (info->name[sizeof(info->name)-1] != '\0') | 736 | if (info->name[sizeof(info->name)-1] != '\0') |
739 | return false; | 737 | return false; |
740 | if (match->family == AF_INET) { | 738 | if (match->family == NFPROTO_IPV4) { |
741 | if (info->cfg.srcmask > 32 || info->cfg.dstmask > 32) | 739 | if (info->cfg.srcmask > 32 || info->cfg.dstmask > 32) |
742 | return false; | 740 | return false; |
743 | } else { | 741 | } else { |
@@ -805,7 +803,7 @@ static struct xt_match hashlimit_mt_reg[] __read_mostly = { | |||
805 | { | 803 | { |
806 | .name = "hashlimit", | 804 | .name = "hashlimit", |
807 | .revision = 0, | 805 | .revision = 0, |
808 | .family = AF_INET, | 806 | .family = NFPROTO_IPV4, |
809 | .match = hashlimit_mt_v0, | 807 | .match = hashlimit_mt_v0, |
810 | .matchsize = sizeof(struct xt_hashlimit_info), | 808 | .matchsize = sizeof(struct xt_hashlimit_info), |
811 | #ifdef CONFIG_COMPAT | 809 | #ifdef CONFIG_COMPAT |
@@ -820,7 +818,7 @@ static struct xt_match hashlimit_mt_reg[] __read_mostly = { | |||
820 | { | 818 | { |
821 | .name = "hashlimit", | 819 | .name = "hashlimit", |
822 | .revision = 1, | 820 | .revision = 1, |
823 | .family = AF_INET, | 821 | .family = NFPROTO_IPV4, |
824 | .match = hashlimit_mt, | 822 | .match = hashlimit_mt, |
825 | .matchsize = sizeof(struct xt_hashlimit_mtinfo1), | 823 | .matchsize = sizeof(struct xt_hashlimit_mtinfo1), |
826 | .checkentry = hashlimit_mt_check, | 824 | .checkentry = hashlimit_mt_check, |
@@ -830,7 +828,7 @@ static struct xt_match hashlimit_mt_reg[] __read_mostly = { | |||
830 | #if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE) | 828 | #if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE) |
831 | { | 829 | { |
832 | .name = "hashlimit", | 830 | .name = "hashlimit", |
833 | .family = AF_INET6, | 831 | .family = NFPROTO_IPV6, |
834 | .match = hashlimit_mt_v0, | 832 | .match = hashlimit_mt_v0, |
835 | .matchsize = sizeof(struct xt_hashlimit_info), | 833 | .matchsize = sizeof(struct xt_hashlimit_info), |
836 | #ifdef CONFIG_COMPAT | 834 | #ifdef CONFIG_COMPAT |
@@ -845,7 +843,7 @@ static struct xt_match hashlimit_mt_reg[] __read_mostly = { | |||
845 | { | 843 | { |
846 | .name = "hashlimit", | 844 | .name = "hashlimit", |
847 | .revision = 1, | 845 | .revision = 1, |
848 | .family = AF_INET6, | 846 | .family = NFPROTO_IPV6, |
849 | .match = hashlimit_mt, | 847 | .match = hashlimit_mt, |
850 | .matchsize = sizeof(struct xt_hashlimit_mtinfo1), | 848 | .matchsize = sizeof(struct xt_hashlimit_mtinfo1), |
851 | .checkentry = hashlimit_mt_check, | 849 | .checkentry = hashlimit_mt_check, |
@@ -907,7 +905,7 @@ static int dl_seq_real_show(struct dsthash_ent *ent, u_int8_t family, | |||
907 | rateinfo_recalc(ent, jiffies); | 905 | rateinfo_recalc(ent, jiffies); |
908 | 906 | ||
909 | switch (family) { | 907 | switch (family) { |
910 | case AF_INET: | 908 | case NFPROTO_IPV4: |
911 | return seq_printf(s, "%ld %u.%u.%u.%u:%u->" | 909 | return seq_printf(s, "%ld %u.%u.%u.%u:%u->" |
912 | "%u.%u.%u.%u:%u %u %u %u\n", | 910 | "%u.%u.%u.%u:%u %u %u %u\n", |
913 | (long)(ent->expires - jiffies)/HZ, | 911 | (long)(ent->expires - jiffies)/HZ, |
@@ -918,7 +916,7 @@ static int dl_seq_real_show(struct dsthash_ent *ent, u_int8_t family, | |||
918 | ent->rateinfo.credit, ent->rateinfo.credit_cap, | 916 | ent->rateinfo.credit, ent->rateinfo.credit_cap, |
919 | ent->rateinfo.cost); | 917 | ent->rateinfo.cost); |
920 | #if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE) | 918 | #if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE) |
921 | case AF_INET6: | 919 | case NFPROTO_IPV6: |
922 | return seq_printf(s, "%ld " NIP6_FMT ":%u->" | 920 | return seq_printf(s, "%ld " NIP6_FMT ":%u->" |
923 | NIP6_FMT ":%u %u %u %u\n", | 921 | NIP6_FMT ":%u %u %u %u\n", |
924 | (long)(ent->expires - jiffies)/HZ, | 922 | (long)(ent->expires - jiffies)/HZ, |
diff --git a/net/netfilter/xt_helper.c b/net/netfilter/xt_helper.c index dada2905d66e..134d94324eb9 100644 --- a/net/netfilter/xt_helper.c +++ b/net/netfilter/xt_helper.c | |||
@@ -81,7 +81,7 @@ static void helper_mt_destroy(const struct xt_match *match, void *matchinfo) | |||
81 | static struct xt_match helper_mt_reg[] __read_mostly = { | 81 | static struct xt_match helper_mt_reg[] __read_mostly = { |
82 | { | 82 | { |
83 | .name = "helper", | 83 | .name = "helper", |
84 | .family = AF_INET, | 84 | .family = NFPROTO_IPV4, |
85 | .checkentry = helper_mt_check, | 85 | .checkentry = helper_mt_check, |
86 | .match = helper_mt, | 86 | .match = helper_mt, |
87 | .destroy = helper_mt_destroy, | 87 | .destroy = helper_mt_destroy, |
@@ -90,7 +90,7 @@ static struct xt_match helper_mt_reg[] __read_mostly = { | |||
90 | }, | 90 | }, |
91 | { | 91 | { |
92 | .name = "helper", | 92 | .name = "helper", |
93 | .family = AF_INET6, | 93 | .family = NFPROTO_IPV6, |
94 | .checkentry = helper_mt_check, | 94 | .checkentry = helper_mt_check, |
95 | .match = helper_mt, | 95 | .match = helper_mt, |
96 | .destroy = helper_mt_destroy, | 96 | .destroy = helper_mt_destroy, |
diff --git a/net/netfilter/xt_iprange.c b/net/netfilter/xt_iprange.c index c63e9333c755..a7498cc48dca 100644 --- a/net/netfilter/xt_iprange.c +++ b/net/netfilter/xt_iprange.c | |||
@@ -141,7 +141,7 @@ static struct xt_match iprange_mt_reg[] __read_mostly = { | |||
141 | { | 141 | { |
142 | .name = "iprange", | 142 | .name = "iprange", |
143 | .revision = 0, | 143 | .revision = 0, |
144 | .family = AF_INET, | 144 | .family = NFPROTO_IPV4, |
145 | .match = iprange_mt_v0, | 145 | .match = iprange_mt_v0, |
146 | .matchsize = sizeof(struct ipt_iprange_info), | 146 | .matchsize = sizeof(struct ipt_iprange_info), |
147 | .me = THIS_MODULE, | 147 | .me = THIS_MODULE, |
@@ -149,7 +149,7 @@ static struct xt_match iprange_mt_reg[] __read_mostly = { | |||
149 | { | 149 | { |
150 | .name = "iprange", | 150 | .name = "iprange", |
151 | .revision = 1, | 151 | .revision = 1, |
152 | .family = AF_INET, | 152 | .family = NFPROTO_IPV4, |
153 | .match = iprange_mt4, | 153 | .match = iprange_mt4, |
154 | .matchsize = sizeof(struct xt_iprange_mtinfo), | 154 | .matchsize = sizeof(struct xt_iprange_mtinfo), |
155 | .me = THIS_MODULE, | 155 | .me = THIS_MODULE, |
@@ -157,7 +157,7 @@ static struct xt_match iprange_mt_reg[] __read_mostly = { | |||
157 | { | 157 | { |
158 | .name = "iprange", | 158 | .name = "iprange", |
159 | .revision = 1, | 159 | .revision = 1, |
160 | .family = AF_INET6, | 160 | .family = NFPROTO_IPV6, |
161 | .match = iprange_mt6, | 161 | .match = iprange_mt6, |
162 | .matchsize = sizeof(struct xt_iprange_mtinfo), | 162 | .matchsize = sizeof(struct xt_iprange_mtinfo), |
163 | .me = THIS_MODULE, | 163 | .me = THIS_MODULE, |
diff --git a/net/netfilter/xt_length.c b/net/netfilter/xt_length.c index b8640f972950..b8612d1914b7 100644 --- a/net/netfilter/xt_length.c +++ b/net/netfilter/xt_length.c | |||
@@ -48,14 +48,14 @@ length_mt6(const struct sk_buff *skb, const struct net_device *in, | |||
48 | static struct xt_match length_mt_reg[] __read_mostly = { | 48 | static struct xt_match length_mt_reg[] __read_mostly = { |
49 | { | 49 | { |
50 | .name = "length", | 50 | .name = "length", |
51 | .family = AF_INET, | 51 | .family = NFPROTO_IPV4, |
52 | .match = length_mt, | 52 | .match = length_mt, |
53 | .matchsize = sizeof(struct xt_length_info), | 53 | .matchsize = sizeof(struct xt_length_info), |
54 | .me = THIS_MODULE, | 54 | .me = THIS_MODULE, |
55 | }, | 55 | }, |
56 | { | 56 | { |
57 | .name = "length", | 57 | .name = "length", |
58 | .family = AF_INET6, | 58 | .family = NFPROTO_IPV6, |
59 | .match = length_mt6, | 59 | .match = length_mt6, |
60 | .matchsize = sizeof(struct xt_length_info), | 60 | .matchsize = sizeof(struct xt_length_info), |
61 | .me = THIS_MODULE, | 61 | .me = THIS_MODULE, |
diff --git a/net/netfilter/xt_limit.c b/net/netfilter/xt_limit.c index aad9ab8d2046..584d66893c4b 100644 --- a/net/netfilter/xt_limit.c +++ b/net/netfilter/xt_limit.c | |||
@@ -170,7 +170,7 @@ static int limit_mt_compat_to_user(void __user *dst, void *src) | |||
170 | static struct xt_match limit_mt_reg[] __read_mostly = { | 170 | static struct xt_match limit_mt_reg[] __read_mostly = { |
171 | { | 171 | { |
172 | .name = "limit", | 172 | .name = "limit", |
173 | .family = AF_INET, | 173 | .family = NFPROTO_IPV4, |
174 | .checkentry = limit_mt_check, | 174 | .checkentry = limit_mt_check, |
175 | .match = limit_mt, | 175 | .match = limit_mt, |
176 | .matchsize = sizeof(struct xt_rateinfo), | 176 | .matchsize = sizeof(struct xt_rateinfo), |
@@ -183,7 +183,7 @@ static struct xt_match limit_mt_reg[] __read_mostly = { | |||
183 | }, | 183 | }, |
184 | { | 184 | { |
185 | .name = "limit", | 185 | .name = "limit", |
186 | .family = AF_INET6, | 186 | .family = NFPROTO_IPV6, |
187 | .checkentry = limit_mt_check, | 187 | .checkentry = limit_mt_check, |
188 | .match = limit_mt, | 188 | .match = limit_mt, |
189 | .matchsize = sizeof(struct xt_rateinfo), | 189 | .matchsize = sizeof(struct xt_rateinfo), |
diff --git a/net/netfilter/xt_mac.c b/net/netfilter/xt_mac.c index b3e96a0ec176..60db240098ac 100644 --- a/net/netfilter/xt_mac.c +++ b/net/netfilter/xt_mac.c | |||
@@ -42,7 +42,7 @@ mac_mt(const struct sk_buff *skb, const struct net_device *in, | |||
42 | static struct xt_match mac_mt_reg[] __read_mostly = { | 42 | static struct xt_match mac_mt_reg[] __read_mostly = { |
43 | { | 43 | { |
44 | .name = "mac", | 44 | .name = "mac", |
45 | .family = AF_INET, | 45 | .family = NFPROTO_IPV4, |
46 | .match = mac_mt, | 46 | .match = mac_mt, |
47 | .matchsize = sizeof(struct xt_mac_info), | 47 | .matchsize = sizeof(struct xt_mac_info), |
48 | .hooks = (1 << NF_INET_PRE_ROUTING) | | 48 | .hooks = (1 << NF_INET_PRE_ROUTING) | |
@@ -52,7 +52,7 @@ static struct xt_match mac_mt_reg[] __read_mostly = { | |||
52 | }, | 52 | }, |
53 | { | 53 | { |
54 | .name = "mac", | 54 | .name = "mac", |
55 | .family = AF_INET6, | 55 | .family = NFPROTO_IPV6, |
56 | .match = mac_mt, | 56 | .match = mac_mt, |
57 | .matchsize = sizeof(struct xt_mac_info), | 57 | .matchsize = sizeof(struct xt_mac_info), |
58 | .hooks = (1 << NF_INET_PRE_ROUTING) | | 58 | .hooks = (1 << NF_INET_PRE_ROUTING) | |
diff --git a/net/netfilter/xt_mark.c b/net/netfilter/xt_mark.c index 9f78f6120fbd..c66affd5722f 100644 --- a/net/netfilter/xt_mark.c +++ b/net/netfilter/xt_mark.c | |||
@@ -92,7 +92,7 @@ static struct xt_match mark_mt_reg[] __read_mostly = { | |||
92 | { | 92 | { |
93 | .name = "mark", | 93 | .name = "mark", |
94 | .revision = 0, | 94 | .revision = 0, |
95 | .family = AF_INET, | 95 | .family = NFPROTO_IPV4, |
96 | .checkentry = mark_mt_check_v0, | 96 | .checkentry = mark_mt_check_v0, |
97 | .match = mark_mt_v0, | 97 | .match = mark_mt_v0, |
98 | .matchsize = sizeof(struct xt_mark_info), | 98 | .matchsize = sizeof(struct xt_mark_info), |
@@ -106,7 +106,7 @@ static struct xt_match mark_mt_reg[] __read_mostly = { | |||
106 | { | 106 | { |
107 | .name = "mark", | 107 | .name = "mark", |
108 | .revision = 0, | 108 | .revision = 0, |
109 | .family = AF_INET6, | 109 | .family = NFPROTO_IPV6, |
110 | .checkentry = mark_mt_check_v0, | 110 | .checkentry = mark_mt_check_v0, |
111 | .match = mark_mt_v0, | 111 | .match = mark_mt_v0, |
112 | .matchsize = sizeof(struct xt_mark_info), | 112 | .matchsize = sizeof(struct xt_mark_info), |
@@ -120,7 +120,7 @@ static struct xt_match mark_mt_reg[] __read_mostly = { | |||
120 | { | 120 | { |
121 | .name = "mark", | 121 | .name = "mark", |
122 | .revision = 1, | 122 | .revision = 1, |
123 | .family = AF_INET, | 123 | .family = NFPROTO_IPV4, |
124 | .match = mark_mt, | 124 | .match = mark_mt, |
125 | .matchsize = sizeof(struct xt_mark_mtinfo1), | 125 | .matchsize = sizeof(struct xt_mark_mtinfo1), |
126 | .me = THIS_MODULE, | 126 | .me = THIS_MODULE, |
@@ -128,7 +128,7 @@ static struct xt_match mark_mt_reg[] __read_mostly = { | |||
128 | { | 128 | { |
129 | .name = "mark", | 129 | .name = "mark", |
130 | .revision = 1, | 130 | .revision = 1, |
131 | .family = AF_INET6, | 131 | .family = NFPROTO_IPV6, |
132 | .match = mark_mt, | 132 | .match = mark_mt, |
133 | .matchsize = sizeof(struct xt_mark_mtinfo1), | 133 | .matchsize = sizeof(struct xt_mark_mtinfo1), |
134 | .me = THIS_MODULE, | 134 | .me = THIS_MODULE, |
diff --git a/net/netfilter/xt_multiport.c b/net/netfilter/xt_multiport.c index fd88c489b70e..f6fe008ab8c3 100644 --- a/net/netfilter/xt_multiport.c +++ b/net/netfilter/xt_multiport.c | |||
@@ -216,7 +216,7 @@ multiport_mt6_check(const char *tablename, const void *info, | |||
216 | static struct xt_match multiport_mt_reg[] __read_mostly = { | 216 | static struct xt_match multiport_mt_reg[] __read_mostly = { |
217 | { | 217 | { |
218 | .name = "multiport", | 218 | .name = "multiport", |
219 | .family = AF_INET, | 219 | .family = NFPROTO_IPV4, |
220 | .revision = 0, | 220 | .revision = 0, |
221 | .checkentry = multiport_mt_check_v0, | 221 | .checkentry = multiport_mt_check_v0, |
222 | .match = multiport_mt_v0, | 222 | .match = multiport_mt_v0, |
@@ -225,7 +225,7 @@ static struct xt_match multiport_mt_reg[] __read_mostly = { | |||
225 | }, | 225 | }, |
226 | { | 226 | { |
227 | .name = "multiport", | 227 | .name = "multiport", |
228 | .family = AF_INET, | 228 | .family = NFPROTO_IPV4, |
229 | .revision = 1, | 229 | .revision = 1, |
230 | .checkentry = multiport_mt_check, | 230 | .checkentry = multiport_mt_check, |
231 | .match = multiport_mt, | 231 | .match = multiport_mt, |
@@ -234,7 +234,7 @@ static struct xt_match multiport_mt_reg[] __read_mostly = { | |||
234 | }, | 234 | }, |
235 | { | 235 | { |
236 | .name = "multiport", | 236 | .name = "multiport", |
237 | .family = AF_INET6, | 237 | .family = NFPROTO_IPV6, |
238 | .revision = 0, | 238 | .revision = 0, |
239 | .checkentry = multiport_mt6_check_v0, | 239 | .checkentry = multiport_mt6_check_v0, |
240 | .match = multiport_mt_v0, | 240 | .match = multiport_mt_v0, |
@@ -243,7 +243,7 @@ static struct xt_match multiport_mt_reg[] __read_mostly = { | |||
243 | }, | 243 | }, |
244 | { | 244 | { |
245 | .name = "multiport", | 245 | .name = "multiport", |
246 | .family = AF_INET6, | 246 | .family = NFPROTO_IPV6, |
247 | .revision = 1, | 247 | .revision = 1, |
248 | .checkentry = multiport_mt6_check, | 248 | .checkentry = multiport_mt6_check, |
249 | .match = multiport_mt, | 249 | .match = multiport_mt, |
diff --git a/net/netfilter/xt_owner.c b/net/netfilter/xt_owner.c index 9059c16144c3..d1c3b7ae9b49 100644 --- a/net/netfilter/xt_owner.c +++ b/net/netfilter/xt_owner.c | |||
@@ -153,7 +153,7 @@ static struct xt_match owner_mt_reg[] __read_mostly = { | |||
153 | { | 153 | { |
154 | .name = "owner", | 154 | .name = "owner", |
155 | .revision = 0, | 155 | .revision = 0, |
156 | .family = AF_INET, | 156 | .family = NFPROTO_IPV4, |
157 | .match = owner_mt_v0, | 157 | .match = owner_mt_v0, |
158 | .matchsize = sizeof(struct ipt_owner_info), | 158 | .matchsize = sizeof(struct ipt_owner_info), |
159 | .checkentry = owner_mt_check_v0, | 159 | .checkentry = owner_mt_check_v0, |
@@ -164,7 +164,7 @@ static struct xt_match owner_mt_reg[] __read_mostly = { | |||
164 | { | 164 | { |
165 | .name = "owner", | 165 | .name = "owner", |
166 | .revision = 0, | 166 | .revision = 0, |
167 | .family = AF_INET6, | 167 | .family = NFPROTO_IPV6, |
168 | .match = owner_mt6_v0, | 168 | .match = owner_mt6_v0, |
169 | .matchsize = sizeof(struct ip6t_owner_info), | 169 | .matchsize = sizeof(struct ip6t_owner_info), |
170 | .checkentry = owner_mt6_check_v0, | 170 | .checkentry = owner_mt6_check_v0, |
@@ -175,7 +175,7 @@ static struct xt_match owner_mt_reg[] __read_mostly = { | |||
175 | { | 175 | { |
176 | .name = "owner", | 176 | .name = "owner", |
177 | .revision = 1, | 177 | .revision = 1, |
178 | .family = AF_INET, | 178 | .family = NFPROTO_IPV4, |
179 | .match = owner_mt, | 179 | .match = owner_mt, |
180 | .matchsize = sizeof(struct xt_owner_match_info), | 180 | .matchsize = sizeof(struct xt_owner_match_info), |
181 | .hooks = (1 << NF_INET_LOCAL_OUT) | | 181 | .hooks = (1 << NF_INET_LOCAL_OUT) | |
@@ -185,7 +185,7 @@ static struct xt_match owner_mt_reg[] __read_mostly = { | |||
185 | { | 185 | { |
186 | .name = "owner", | 186 | .name = "owner", |
187 | .revision = 1, | 187 | .revision = 1, |
188 | .family = AF_INET6, | 188 | .family = NFPROTO_IPV6, |
189 | .match = owner_mt, | 189 | .match = owner_mt, |
190 | .matchsize = sizeof(struct xt_owner_match_info), | 190 | .matchsize = sizeof(struct xt_owner_match_info), |
191 | .hooks = (1 << NF_INET_LOCAL_OUT) | | 191 | .hooks = (1 << NF_INET_LOCAL_OUT) | |
diff --git a/net/netfilter/xt_physdev.c b/net/netfilter/xt_physdev.c index 4ec1094bda92..72a0bdd53fa8 100644 --- a/net/netfilter/xt_physdev.c +++ b/net/netfilter/xt_physdev.c | |||
@@ -121,7 +121,7 @@ physdev_mt_check(const char *tablename, const void *ip, | |||
121 | static struct xt_match physdev_mt_reg[] __read_mostly = { | 121 | static struct xt_match physdev_mt_reg[] __read_mostly = { |
122 | { | 122 | { |
123 | .name = "physdev", | 123 | .name = "physdev", |
124 | .family = AF_INET, | 124 | .family = NFPROTO_IPV4, |
125 | .checkentry = physdev_mt_check, | 125 | .checkentry = physdev_mt_check, |
126 | .match = physdev_mt, | 126 | .match = physdev_mt, |
127 | .matchsize = sizeof(struct xt_physdev_info), | 127 | .matchsize = sizeof(struct xt_physdev_info), |
@@ -129,7 +129,7 @@ static struct xt_match physdev_mt_reg[] __read_mostly = { | |||
129 | }, | 129 | }, |
130 | { | 130 | { |
131 | .name = "physdev", | 131 | .name = "physdev", |
132 | .family = AF_INET6, | 132 | .family = NFPROTO_IPV6, |
133 | .checkentry = physdev_mt_check, | 133 | .checkentry = physdev_mt_check, |
134 | .match = physdev_mt, | 134 | .match = physdev_mt, |
135 | .matchsize = sizeof(struct xt_physdev_info), | 135 | .matchsize = sizeof(struct xt_physdev_info), |
diff --git a/net/netfilter/xt_pkttype.c b/net/netfilter/xt_pkttype.c index 7936f7e23254..81e86d319a8f 100644 --- a/net/netfilter/xt_pkttype.c +++ b/net/netfilter/xt_pkttype.c | |||
@@ -33,10 +33,10 @@ pkttype_mt(const struct sk_buff *skb, const struct net_device *in, | |||
33 | 33 | ||
34 | if (skb->pkt_type != PACKET_LOOPBACK) | 34 | if (skb->pkt_type != PACKET_LOOPBACK) |
35 | type = skb->pkt_type; | 35 | type = skb->pkt_type; |
36 | else if (match->family == AF_INET && | 36 | else if (match->family == NFPROTO_IPV4 && |
37 | ipv4_is_multicast(ip_hdr(skb)->daddr)) | 37 | ipv4_is_multicast(ip_hdr(skb)->daddr)) |
38 | type = PACKET_MULTICAST; | 38 | type = PACKET_MULTICAST; |
39 | else if (match->family == AF_INET6 && | 39 | else if (match->family == NFPROTO_IPV6 && |
40 | ipv6_hdr(skb)->daddr.s6_addr[0] == 0xFF) | 40 | ipv6_hdr(skb)->daddr.s6_addr[0] == 0xFF) |
41 | type = PACKET_MULTICAST; | 41 | type = PACKET_MULTICAST; |
42 | else | 42 | else |
@@ -48,14 +48,14 @@ pkttype_mt(const struct sk_buff *skb, const struct net_device *in, | |||
48 | static struct xt_match pkttype_mt_reg[] __read_mostly = { | 48 | static struct xt_match pkttype_mt_reg[] __read_mostly = { |
49 | { | 49 | { |
50 | .name = "pkttype", | 50 | .name = "pkttype", |
51 | .family = AF_INET, | 51 | .family = NFPROTO_IPV4, |
52 | .match = pkttype_mt, | 52 | .match = pkttype_mt, |
53 | .matchsize = sizeof(struct xt_pkttype_info), | 53 | .matchsize = sizeof(struct xt_pkttype_info), |
54 | .me = THIS_MODULE, | 54 | .me = THIS_MODULE, |
55 | }, | 55 | }, |
56 | { | 56 | { |
57 | .name = "pkttype", | 57 | .name = "pkttype", |
58 | .family = AF_INET6, | 58 | .family = NFPROTO_IPV6, |
59 | .match = pkttype_mt, | 59 | .match = pkttype_mt, |
60 | .matchsize = sizeof(struct xt_pkttype_info), | 60 | .matchsize = sizeof(struct xt_pkttype_info), |
61 | .me = THIS_MODULE, | 61 | .me = THIS_MODULE, |
diff --git a/net/netfilter/xt_policy.c b/net/netfilter/xt_policy.c index d351582b2a3d..f1d514e9d0a2 100644 --- a/net/netfilter/xt_policy.c +++ b/net/netfilter/xt_policy.c | |||
@@ -26,9 +26,9 @@ xt_addr_cmp(const union nf_inet_addr *a1, const union nf_inet_addr *m, | |||
26 | const union nf_inet_addr *a2, unsigned short family) | 26 | const union nf_inet_addr *a2, unsigned short family) |
27 | { | 27 | { |
28 | switch (family) { | 28 | switch (family) { |
29 | case AF_INET: | 29 | case NFPROTO_IPV4: |
30 | return ((a1->ip ^ a2->ip) & m->ip) == 0; | 30 | return ((a1->ip ^ a2->ip) & m->ip) == 0; |
31 | case AF_INET6: | 31 | case NFPROTO_IPV6: |
32 | return ipv6_masked_addr_cmp(&a1->in6, &m->in6, &a2->in6) == 0; | 32 | return ipv6_masked_addr_cmp(&a1->in6, &m->in6, &a2->in6) == 0; |
33 | } | 33 | } |
34 | return false; | 34 | return false; |
@@ -165,7 +165,7 @@ policy_mt_check(const char *tablename, const void *ip_void, | |||
165 | static struct xt_match policy_mt_reg[] __read_mostly = { | 165 | static struct xt_match policy_mt_reg[] __read_mostly = { |
166 | { | 166 | { |
167 | .name = "policy", | 167 | .name = "policy", |
168 | .family = AF_INET, | 168 | .family = NFPROTO_IPV4, |
169 | .checkentry = policy_mt_check, | 169 | .checkentry = policy_mt_check, |
170 | .match = policy_mt, | 170 | .match = policy_mt, |
171 | .matchsize = sizeof(struct xt_policy_info), | 171 | .matchsize = sizeof(struct xt_policy_info), |
@@ -173,7 +173,7 @@ static struct xt_match policy_mt_reg[] __read_mostly = { | |||
173 | }, | 173 | }, |
174 | { | 174 | { |
175 | .name = "policy", | 175 | .name = "policy", |
176 | .family = AF_INET6, | 176 | .family = NFPROTO_IPV6, |
177 | .checkentry = policy_mt_check, | 177 | .checkentry = policy_mt_check, |
178 | .match = policy_mt, | 178 | .match = policy_mt, |
179 | .matchsize = sizeof(struct xt_policy_info), | 179 | .matchsize = sizeof(struct xt_policy_info), |
diff --git a/net/netfilter/xt_quota.c b/net/netfilter/xt_quota.c index 3b021d0c522a..59f61e32b62b 100644 --- a/net/netfilter/xt_quota.c +++ b/net/netfilter/xt_quota.c | |||
@@ -57,7 +57,7 @@ quota_mt_check(const char *tablename, const void *entry, | |||
57 | static struct xt_match quota_mt_reg[] __read_mostly = { | 57 | static struct xt_match quota_mt_reg[] __read_mostly = { |
58 | { | 58 | { |
59 | .name = "quota", | 59 | .name = "quota", |
60 | .family = AF_INET, | 60 | .family = NFPROTO_IPV4, |
61 | .checkentry = quota_mt_check, | 61 | .checkentry = quota_mt_check, |
62 | .match = quota_mt, | 62 | .match = quota_mt, |
63 | .matchsize = sizeof(struct xt_quota_info), | 63 | .matchsize = sizeof(struct xt_quota_info), |
@@ -65,7 +65,7 @@ static struct xt_match quota_mt_reg[] __read_mostly = { | |||
65 | }, | 65 | }, |
66 | { | 66 | { |
67 | .name = "quota", | 67 | .name = "quota", |
68 | .family = AF_INET6, | 68 | .family = NFPROTO_IPV6, |
69 | .checkentry = quota_mt_check, | 69 | .checkentry = quota_mt_check, |
70 | .match = quota_mt, | 70 | .match = quota_mt, |
71 | .matchsize = sizeof(struct xt_quota_info), | 71 | .matchsize = sizeof(struct xt_quota_info), |
diff --git a/net/netfilter/xt_rateest.c b/net/netfilter/xt_rateest.c index ebd84f1b4f62..ba1cb5760f48 100644 --- a/net/netfilter/xt_rateest.c +++ b/net/netfilter/xt_rateest.c | |||
@@ -139,7 +139,7 @@ static void xt_rateest_mt_destroy(const struct xt_match *match, | |||
139 | 139 | ||
140 | static struct xt_match xt_rateest_match[] __read_mostly = { | 140 | static struct xt_match xt_rateest_match[] __read_mostly = { |
141 | { | 141 | { |
142 | .family = AF_INET, | 142 | .family = NFPROTO_IPV4, |
143 | .name = "rateest", | 143 | .name = "rateest", |
144 | .match = xt_rateest_mt, | 144 | .match = xt_rateest_mt, |
145 | .checkentry = xt_rateest_mt_checkentry, | 145 | .checkentry = xt_rateest_mt_checkentry, |
@@ -148,7 +148,7 @@ static struct xt_match xt_rateest_match[] __read_mostly = { | |||
148 | .me = THIS_MODULE, | 148 | .me = THIS_MODULE, |
149 | }, | 149 | }, |
150 | { | 150 | { |
151 | .family = AF_INET6, | 151 | .family = NFPROTO_IPV6, |
152 | .name = "rateest", | 152 | .name = "rateest", |
153 | .match = xt_rateest_mt, | 153 | .match = xt_rateest_mt, |
154 | .checkentry = xt_rateest_mt_checkentry, | 154 | .checkentry = xt_rateest_mt_checkentry, |
diff --git a/net/netfilter/xt_realm.c b/net/netfilter/xt_realm.c index 7df1627c536f..ef65756d4894 100644 --- a/net/netfilter/xt_realm.c +++ b/net/netfilter/xt_realm.c | |||
@@ -39,7 +39,7 @@ static struct xt_match realm_mt_reg __read_mostly = { | |||
39 | .matchsize = sizeof(struct xt_realm_info), | 39 | .matchsize = sizeof(struct xt_realm_info), |
40 | .hooks = (1 << NF_INET_POST_ROUTING) | (1 << NF_INET_FORWARD) | | 40 | .hooks = (1 << NF_INET_POST_ROUTING) | (1 << NF_INET_FORWARD) | |
41 | (1 << NF_INET_LOCAL_OUT) | (1 << NF_INET_LOCAL_IN), | 41 | (1 << NF_INET_LOCAL_OUT) | (1 << NF_INET_LOCAL_IN), |
42 | .family = AF_INET, | 42 | .family = NFPROTO_IPV4, |
43 | .me = THIS_MODULE | 43 | .me = THIS_MODULE |
44 | }; | 44 | }; |
45 | 45 | ||
diff --git a/net/netfilter/xt_recent.c b/net/netfilter/xt_recent.c index adc2e2f1b09c..4a916e2624d3 100644 --- a/net/netfilter/xt_recent.c +++ b/net/netfilter/xt_recent.c | |||
@@ -124,7 +124,7 @@ recent_entry_lookup(const struct recent_table *table, | |||
124 | struct recent_entry *e; | 124 | struct recent_entry *e; |
125 | unsigned int h; | 125 | unsigned int h; |
126 | 126 | ||
127 | if (family == AF_INET) | 127 | if (family == NFPROTO_IPV4) |
128 | h = recent_entry_hash4(addrp); | 128 | h = recent_entry_hash4(addrp); |
129 | else | 129 | else |
130 | h = recent_entry_hash6(addrp); | 130 | h = recent_entry_hash6(addrp); |
@@ -165,7 +165,7 @@ recent_entry_init(struct recent_table *t, const union nf_inet_addr *addr, | |||
165 | e->nstamps = 1; | 165 | e->nstamps = 1; |
166 | e->index = 1; | 166 | e->index = 1; |
167 | e->family = family; | 167 | e->family = family; |
168 | if (family == AF_INET) | 168 | if (family == NFPROTO_IPV4) |
169 | list_add_tail(&e->list, &t->iphash[recent_entry_hash4(addr)]); | 169 | list_add_tail(&e->list, &t->iphash[recent_entry_hash4(addr)]); |
170 | else | 170 | else |
171 | list_add_tail(&e->list, &t->iphash[recent_entry_hash6(addr)]); | 171 | list_add_tail(&e->list, &t->iphash[recent_entry_hash6(addr)]); |
@@ -216,7 +216,7 @@ recent_mt(const struct sk_buff *skb, const struct net_device *in, | |||
216 | u_int8_t ttl; | 216 | u_int8_t ttl; |
217 | bool ret = info->invert; | 217 | bool ret = info->invert; |
218 | 218 | ||
219 | if (match->family == AF_INET) { | 219 | if (match->family == NFPROTO_IPV4) { |
220 | const struct iphdr *iph = ip_hdr(skb); | 220 | const struct iphdr *iph = ip_hdr(skb); |
221 | 221 | ||
222 | if (info->side == XT_RECENT_DEST) | 222 | if (info->side == XT_RECENT_DEST) |
@@ -429,7 +429,7 @@ static int recent_seq_show(struct seq_file *seq, void *v) | |||
429 | unsigned int i; | 429 | unsigned int i; |
430 | 430 | ||
431 | i = (e->index - 1) % ip_pkt_list_tot; | 431 | i = (e->index - 1) % ip_pkt_list_tot; |
432 | if (e->family == AF_INET) | 432 | if (e->family == NFPROTO_IPV4) |
433 | seq_printf(seq, "src=" NIPQUAD_FMT " ttl: %u last_seen: %lu " | 433 | seq_printf(seq, "src=" NIPQUAD_FMT " ttl: %u last_seen: %lu " |
434 | "oldest_pkt: %u", NIPQUAD(e->addr.ip), e->ttl, | 434 | "oldest_pkt: %u", NIPQUAD(e->addr.ip), e->ttl, |
435 | e->stamps[i], e->index); | 435 | e->stamps[i], e->index); |
@@ -519,10 +519,11 @@ static ssize_t recent_old_proc_write(struct file *file, | |||
519 | addr = in_aton(c); | 519 | addr = in_aton(c); |
520 | 520 | ||
521 | spin_lock_bh(&recent_lock); | 521 | spin_lock_bh(&recent_lock); |
522 | e = recent_entry_lookup(t, (const void *)&addr, PF_INET, 0); | 522 | e = recent_entry_lookup(t, (const void *)&addr, NFPROTO_IPV4, 0); |
523 | if (e == NULL) { | 523 | if (e == NULL) { |
524 | if (add) | 524 | if (add) |
525 | recent_entry_init(t, (const void *)&addr, PF_INET, 0); | 525 | recent_entry_init(t, (const void *)&addr, |
526 | NFPROTO_IPV4, 0); | ||
526 | } else { | 527 | } else { |
527 | if (add) | 528 | if (add) |
528 | recent_entry_update(t, e); | 529 | recent_entry_update(t, e); |
@@ -585,10 +586,10 @@ recent_mt_proc_write(struct file *file, const char __user *input, | |||
585 | ++c; | 586 | ++c; |
586 | --size; | 587 | --size; |
587 | if (strnchr(c, size, ':') != NULL) { | 588 | if (strnchr(c, size, ':') != NULL) { |
588 | family = AF_INET6; | 589 | family = NFPROTO_IPV6; |
589 | succ = in6_pton(c, size, (void *)&addr, '\n', NULL); | 590 | succ = in6_pton(c, size, (void *)&addr, '\n', NULL); |
590 | } else { | 591 | } else { |
591 | family = AF_INET; | 592 | family = NFPROTO_IPV4; |
592 | succ = in4_pton(c, size, (void *)&addr, '\n', NULL); | 593 | succ = in4_pton(c, size, (void *)&addr, '\n', NULL); |
593 | } | 594 | } |
594 | 595 | ||
@@ -628,7 +629,7 @@ static struct xt_match recent_mt_reg[] __read_mostly = { | |||
628 | { | 629 | { |
629 | .name = "recent", | 630 | .name = "recent", |
630 | .revision = 0, | 631 | .revision = 0, |
631 | .family = AF_INET, | 632 | .family = NFPROTO_IPV4, |
632 | .match = recent_mt, | 633 | .match = recent_mt, |
633 | .matchsize = sizeof(struct xt_recent_mtinfo), | 634 | .matchsize = sizeof(struct xt_recent_mtinfo), |
634 | .checkentry = recent_mt_check, | 635 | .checkentry = recent_mt_check, |
@@ -638,7 +639,7 @@ static struct xt_match recent_mt_reg[] __read_mostly = { | |||
638 | { | 639 | { |
639 | .name = "recent", | 640 | .name = "recent", |
640 | .revision = 0, | 641 | .revision = 0, |
641 | .family = AF_INET6, | 642 | .family = NFPROTO_IPV6, |
642 | .match = recent_mt, | 643 | .match = recent_mt, |
643 | .matchsize = sizeof(struct xt_recent_mtinfo), | 644 | .matchsize = sizeof(struct xt_recent_mtinfo), |
644 | .checkentry = recent_mt_check, | 645 | .checkentry = recent_mt_check, |
diff --git a/net/netfilter/xt_sctp.c b/net/netfilter/xt_sctp.c index e6e4681fa047..ab67aca4d8fe 100644 --- a/net/netfilter/xt_sctp.c +++ b/net/netfilter/xt_sctp.c | |||
@@ -169,7 +169,7 @@ sctp_mt_check(const char *tablename, const void *inf, | |||
169 | static struct xt_match sctp_mt_reg[] __read_mostly = { | 169 | static struct xt_match sctp_mt_reg[] __read_mostly = { |
170 | { | 170 | { |
171 | .name = "sctp", | 171 | .name = "sctp", |
172 | .family = AF_INET, | 172 | .family = NFPROTO_IPV4, |
173 | .checkentry = sctp_mt_check, | 173 | .checkentry = sctp_mt_check, |
174 | .match = sctp_mt, | 174 | .match = sctp_mt, |
175 | .matchsize = sizeof(struct xt_sctp_info), | 175 | .matchsize = sizeof(struct xt_sctp_info), |
@@ -178,7 +178,7 @@ static struct xt_match sctp_mt_reg[] __read_mostly = { | |||
178 | }, | 178 | }, |
179 | { | 179 | { |
180 | .name = "sctp", | 180 | .name = "sctp", |
181 | .family = AF_INET6, | 181 | .family = NFPROTO_IPV6, |
182 | .checkentry = sctp_mt_check, | 182 | .checkentry = sctp_mt_check, |
183 | .match = sctp_mt, | 183 | .match = sctp_mt, |
184 | .matchsize = sizeof(struct xt_sctp_info), | 184 | .matchsize = sizeof(struct xt_sctp_info), |
diff --git a/net/netfilter/xt_state.c b/net/netfilter/xt_state.c index a776dc36a193..f92f8bcc1e38 100644 --- a/net/netfilter/xt_state.c +++ b/net/netfilter/xt_state.c | |||
@@ -61,7 +61,7 @@ static void state_mt_destroy(const struct xt_match *match, void *matchinfo) | |||
61 | static struct xt_match state_mt_reg[] __read_mostly = { | 61 | static struct xt_match state_mt_reg[] __read_mostly = { |
62 | { | 62 | { |
63 | .name = "state", | 63 | .name = "state", |
64 | .family = AF_INET, | 64 | .family = NFPROTO_IPV4, |
65 | .checkentry = state_mt_check, | 65 | .checkentry = state_mt_check, |
66 | .match = state_mt, | 66 | .match = state_mt, |
67 | .destroy = state_mt_destroy, | 67 | .destroy = state_mt_destroy, |
@@ -70,7 +70,7 @@ static struct xt_match state_mt_reg[] __read_mostly = { | |||
70 | }, | 70 | }, |
71 | { | 71 | { |
72 | .name = "state", | 72 | .name = "state", |
73 | .family = AF_INET6, | 73 | .family = NFPROTO_IPV6, |
74 | .checkentry = state_mt_check, | 74 | .checkentry = state_mt_check, |
75 | .match = state_mt, | 75 | .match = state_mt, |
76 | .destroy = state_mt_destroy, | 76 | .destroy = state_mt_destroy, |
diff --git a/net/netfilter/xt_statistic.c b/net/netfilter/xt_statistic.c index 43133080da7d..fd3bb1400df4 100644 --- a/net/netfilter/xt_statistic.c +++ b/net/netfilter/xt_statistic.c | |||
@@ -69,7 +69,7 @@ statistic_mt_check(const char *tablename, const void *entry, | |||
69 | static struct xt_match statistic_mt_reg[] __read_mostly = { | 69 | static struct xt_match statistic_mt_reg[] __read_mostly = { |
70 | { | 70 | { |
71 | .name = "statistic", | 71 | .name = "statistic", |
72 | .family = AF_INET, | 72 | .family = NFPROTO_IPV4, |
73 | .checkentry = statistic_mt_check, | 73 | .checkentry = statistic_mt_check, |
74 | .match = statistic_mt, | 74 | .match = statistic_mt, |
75 | .matchsize = sizeof(struct xt_statistic_info), | 75 | .matchsize = sizeof(struct xt_statistic_info), |
@@ -77,7 +77,7 @@ static struct xt_match statistic_mt_reg[] __read_mostly = { | |||
77 | }, | 77 | }, |
78 | { | 78 | { |
79 | .name = "statistic", | 79 | .name = "statistic", |
80 | .family = AF_INET6, | 80 | .family = NFPROTO_IPV6, |
81 | .checkentry = statistic_mt_check, | 81 | .checkentry = statistic_mt_check, |
82 | .match = statistic_mt, | 82 | .match = statistic_mt, |
83 | .matchsize = sizeof(struct xt_statistic_info), | 83 | .matchsize = sizeof(struct xt_statistic_info), |
diff --git a/net/netfilter/xt_string.c b/net/netfilter/xt_string.c index 4903182a062b..501697183774 100644 --- a/net/netfilter/xt_string.c +++ b/net/netfilter/xt_string.c | |||
@@ -85,7 +85,7 @@ static struct xt_match string_mt_reg[] __read_mostly = { | |||
85 | { | 85 | { |
86 | .name = "string", | 86 | .name = "string", |
87 | .revision = 0, | 87 | .revision = 0, |
88 | .family = AF_INET, | 88 | .family = NFPROTO_IPV4, |
89 | .checkentry = string_mt_check, | 89 | .checkentry = string_mt_check, |
90 | .match = string_mt, | 90 | .match = string_mt, |
91 | .destroy = string_mt_destroy, | 91 | .destroy = string_mt_destroy, |
@@ -95,7 +95,7 @@ static struct xt_match string_mt_reg[] __read_mostly = { | |||
95 | { | 95 | { |
96 | .name = "string", | 96 | .name = "string", |
97 | .revision = 1, | 97 | .revision = 1, |
98 | .family = AF_INET, | 98 | .family = NFPROTO_IPV4, |
99 | .checkentry = string_mt_check, | 99 | .checkentry = string_mt_check, |
100 | .match = string_mt, | 100 | .match = string_mt, |
101 | .destroy = string_mt_destroy, | 101 | .destroy = string_mt_destroy, |
@@ -105,7 +105,7 @@ static struct xt_match string_mt_reg[] __read_mostly = { | |||
105 | { | 105 | { |
106 | .name = "string", | 106 | .name = "string", |
107 | .revision = 0, | 107 | .revision = 0, |
108 | .family = AF_INET6, | 108 | .family = NFPROTO_IPV6, |
109 | .checkentry = string_mt_check, | 109 | .checkentry = string_mt_check, |
110 | .match = string_mt, | 110 | .match = string_mt, |
111 | .destroy = string_mt_destroy, | 111 | .destroy = string_mt_destroy, |
@@ -115,7 +115,7 @@ static struct xt_match string_mt_reg[] __read_mostly = { | |||
115 | { | 115 | { |
116 | .name = "string", | 116 | .name = "string", |
117 | .revision = 1, | 117 | .revision = 1, |
118 | .family = AF_INET6, | 118 | .family = NFPROTO_IPV6, |
119 | .checkentry = string_mt_check, | 119 | .checkentry = string_mt_check, |
120 | .match = string_mt, | 120 | .match = string_mt, |
121 | .destroy = string_mt_destroy, | 121 | .destroy = string_mt_destroy, |
diff --git a/net/netfilter/xt_tcpmss.c b/net/netfilter/xt_tcpmss.c index 6771bf01275b..4791c7cbe5a9 100644 --- a/net/netfilter/xt_tcpmss.c +++ b/net/netfilter/xt_tcpmss.c | |||
@@ -83,7 +83,7 @@ dropit: | |||
83 | static struct xt_match tcpmss_mt_reg[] __read_mostly = { | 83 | static struct xt_match tcpmss_mt_reg[] __read_mostly = { |
84 | { | 84 | { |
85 | .name = "tcpmss", | 85 | .name = "tcpmss", |
86 | .family = AF_INET, | 86 | .family = NFPROTO_IPV4, |
87 | .match = tcpmss_mt, | 87 | .match = tcpmss_mt, |
88 | .matchsize = sizeof(struct xt_tcpmss_match_info), | 88 | .matchsize = sizeof(struct xt_tcpmss_match_info), |
89 | .proto = IPPROTO_TCP, | 89 | .proto = IPPROTO_TCP, |
@@ -91,7 +91,7 @@ static struct xt_match tcpmss_mt_reg[] __read_mostly = { | |||
91 | }, | 91 | }, |
92 | { | 92 | { |
93 | .name = "tcpmss", | 93 | .name = "tcpmss", |
94 | .family = AF_INET6, | 94 | .family = NFPROTO_IPV6, |
95 | .match = tcpmss_mt, | 95 | .match = tcpmss_mt, |
96 | .matchsize = sizeof(struct xt_tcpmss_match_info), | 96 | .matchsize = sizeof(struct xt_tcpmss_match_info), |
97 | .proto = IPPROTO_TCP, | 97 | .proto = IPPROTO_TCP, |
diff --git a/net/netfilter/xt_tcpudp.c b/net/netfilter/xt_tcpudp.c index 951b06b8d701..5a6268cbb9f8 100644 --- a/net/netfilter/xt_tcpudp.c +++ b/net/netfilter/xt_tcpudp.c | |||
@@ -186,7 +186,7 @@ udp_mt_check(const char *tablename, const void *info, | |||
186 | static struct xt_match tcpudp_mt_reg[] __read_mostly = { | 186 | static struct xt_match tcpudp_mt_reg[] __read_mostly = { |
187 | { | 187 | { |
188 | .name = "tcp", | 188 | .name = "tcp", |
189 | .family = AF_INET, | 189 | .family = NFPROTO_IPV4, |
190 | .checkentry = tcp_mt_check, | 190 | .checkentry = tcp_mt_check, |
191 | .match = tcp_mt, | 191 | .match = tcp_mt, |
192 | .matchsize = sizeof(struct xt_tcp), | 192 | .matchsize = sizeof(struct xt_tcp), |
@@ -195,7 +195,7 @@ static struct xt_match tcpudp_mt_reg[] __read_mostly = { | |||
195 | }, | 195 | }, |
196 | { | 196 | { |
197 | .name = "tcp", | 197 | .name = "tcp", |
198 | .family = AF_INET6, | 198 | .family = NFPROTO_IPV6, |
199 | .checkentry = tcp_mt_check, | 199 | .checkentry = tcp_mt_check, |
200 | .match = tcp_mt, | 200 | .match = tcp_mt, |
201 | .matchsize = sizeof(struct xt_tcp), | 201 | .matchsize = sizeof(struct xt_tcp), |
@@ -204,7 +204,7 @@ static struct xt_match tcpudp_mt_reg[] __read_mostly = { | |||
204 | }, | 204 | }, |
205 | { | 205 | { |
206 | .name = "udp", | 206 | .name = "udp", |
207 | .family = AF_INET, | 207 | .family = NFPROTO_IPV4, |
208 | .checkentry = udp_mt_check, | 208 | .checkentry = udp_mt_check, |
209 | .match = udp_mt, | 209 | .match = udp_mt, |
210 | .matchsize = sizeof(struct xt_udp), | 210 | .matchsize = sizeof(struct xt_udp), |
@@ -213,7 +213,7 @@ static struct xt_match tcpudp_mt_reg[] __read_mostly = { | |||
213 | }, | 213 | }, |
214 | { | 214 | { |
215 | .name = "udp", | 215 | .name = "udp", |
216 | .family = AF_INET6, | 216 | .family = NFPROTO_IPV6, |
217 | .checkentry = udp_mt_check, | 217 | .checkentry = udp_mt_check, |
218 | .match = udp_mt, | 218 | .match = udp_mt, |
219 | .matchsize = sizeof(struct xt_udp), | 219 | .matchsize = sizeof(struct xt_udp), |
@@ -222,7 +222,7 @@ static struct xt_match tcpudp_mt_reg[] __read_mostly = { | |||
222 | }, | 222 | }, |
223 | { | 223 | { |
224 | .name = "udplite", | 224 | .name = "udplite", |
225 | .family = AF_INET, | 225 | .family = NFPROTO_IPV4, |
226 | .checkentry = udp_mt_check, | 226 | .checkentry = udp_mt_check, |
227 | .match = udp_mt, | 227 | .match = udp_mt, |
228 | .matchsize = sizeof(struct xt_udp), | 228 | .matchsize = sizeof(struct xt_udp), |
@@ -231,7 +231,7 @@ static struct xt_match tcpudp_mt_reg[] __read_mostly = { | |||
231 | }, | 231 | }, |
232 | { | 232 | { |
233 | .name = "udplite", | 233 | .name = "udplite", |
234 | .family = AF_INET6, | 234 | .family = NFPROTO_IPV6, |
235 | .checkentry = udp_mt_check, | 235 | .checkentry = udp_mt_check, |
236 | .match = udp_mt, | 236 | .match = udp_mt, |
237 | .matchsize = sizeof(struct xt_udp), | 237 | .matchsize = sizeof(struct xt_udp), |
diff --git a/net/netfilter/xt_time.c b/net/netfilter/xt_time.c index 307a2c3c2df4..fe9dae2b4f55 100644 --- a/net/netfilter/xt_time.c +++ b/net/netfilter/xt_time.c | |||
@@ -240,7 +240,7 @@ time_mt_check(const char *tablename, const void *ip, | |||
240 | static struct xt_match time_mt_reg[] __read_mostly = { | 240 | static struct xt_match time_mt_reg[] __read_mostly = { |
241 | { | 241 | { |
242 | .name = "time", | 242 | .name = "time", |
243 | .family = AF_INET, | 243 | .family = NFPROTO_IPV4, |
244 | .match = time_mt, | 244 | .match = time_mt, |
245 | .matchsize = sizeof(struct xt_time_info), | 245 | .matchsize = sizeof(struct xt_time_info), |
246 | .checkentry = time_mt_check, | 246 | .checkentry = time_mt_check, |
@@ -248,7 +248,7 @@ static struct xt_match time_mt_reg[] __read_mostly = { | |||
248 | }, | 248 | }, |
249 | { | 249 | { |
250 | .name = "time", | 250 | .name = "time", |
251 | .family = AF_INET6, | 251 | .family = NFPROTO_IPV6, |
252 | .match = time_mt, | 252 | .match = time_mt, |
253 | .matchsize = sizeof(struct xt_time_info), | 253 | .matchsize = sizeof(struct xt_time_info), |
254 | .checkentry = time_mt_check, | 254 | .checkentry = time_mt_check, |
diff --git a/net/netfilter/xt_u32.c b/net/netfilter/xt_u32.c index 627e0f336d54..ed9f83406112 100644 --- a/net/netfilter/xt_u32.c +++ b/net/netfilter/xt_u32.c | |||
@@ -102,14 +102,14 @@ u32_mt(const struct sk_buff *skb, const struct net_device *in, | |||
102 | static struct xt_match u32_mt_reg[] __read_mostly = { | 102 | static struct xt_match u32_mt_reg[] __read_mostly = { |
103 | { | 103 | { |
104 | .name = "u32", | 104 | .name = "u32", |
105 | .family = AF_INET, | 105 | .family = NFPROTO_IPV4, |
106 | .match = u32_mt, | 106 | .match = u32_mt, |
107 | .matchsize = sizeof(struct xt_u32), | 107 | .matchsize = sizeof(struct xt_u32), |
108 | .me = THIS_MODULE, | 108 | .me = THIS_MODULE, |
109 | }, | 109 | }, |
110 | { | 110 | { |
111 | .name = "u32", | 111 | .name = "u32", |
112 | .family = AF_INET6, | 112 | .family = NFPROTO_IPV6, |
113 | .match = u32_mt, | 113 | .match = u32_mt, |
114 | .matchsize = sizeof(struct xt_u32), | 114 | .matchsize = sizeof(struct xt_u32), |
115 | .me = THIS_MODULE, | 115 | .me = THIS_MODULE, |