History

Merge branch 'master' of git://blackhole.kfki.hu/nf-next

Jozsef Kadlecsik says: ==================== ipset patches for nf-next - Remove useless memset() calls, nla_parse_nested/nla_parse erase the tb array properly, from Florent Fourcot. - Merge the uadd and udel functions, the code is nicer this way, also from Florent Fourcot. - Add a missing check for the return value of a nla_parse[_deprecated] call, from Aditya Pakki. - Add the last missing check for the return value of nla_parse[_deprecated] call. - Fix error path and release the references properly in set_target_v3_checkentry(). - Fix memory accounting which is reported to userspace for hash types on resize, from Stefano Brivio. - Update my email address to kadlec@netfilter.org. The patch covers all places in the source tree where my kadlec@blackhole.kfki.hu address could be found. ====================

Pablo Neira Ayuso committed 7 years ago

Commit 667ec212 parents 2256759 fe03d4734 files · +104 −130Browse files

Unified · Split

34 files
  1. CREDITS +1 −1
  2. MAINTAINERS +1 −1
  3. include/linux/jhash.h +1 −1
  4. include/linux/netfilter/ipset/ip_set.h +1 −1
  5. include/linux/netfilter/ipset/ip_set_counter.h +1 −1
  6. include/linux/netfilter/ipset/ip_set_skbinfo.h +1 −1
  7. include/linux/netfilter/ipset/ip_set_timeout.h +1 −1
  8. include/uapi/linux/netfilter/ipset/ip_set.h +1 −1
  9. net/ipv4/netfilter/iptable_raw.c +1 −1
  10. net/ipv4/netfilter/nf_nat_h323.c +1 −1
  11. net/ipv6/netfilter/ip6table_raw.c +1 −1
  12. net/netfilter/ipset/ip_set_bitmap_gen.h +1 −1
  13. net/netfilter/ipset/ip_set_bitmap_ip.c +2 −2
  14. net/netfilter/ipset/ip_set_bitmap_ipmac.c +2 −2
  15. net/netfilter/ipset/ip_set_bitmap_port.c +2 −2
  16. net/netfilter/ipset/ip_set_core.c +35 −62
  17. net/netfilter/ipset/ip_set_getport.c +1 −1
  18. net/netfilter/ipset/ip_set_hash_gen.h +2 −2
  19. net/netfilter/ipset/ip_set_hash_ip.c +2 −2
  20. net/netfilter/ipset/ip_set_hash_ipmark.c +1 −1
  21. net/netfilter/ipset/ip_set_hash_ipport.c +2 −2
  22. net/netfilter/ipset/ip_set_hash_ipportip.c +2 −2
  23. net/netfilter/ipset/ip_set_hash_ipportnet.c +2 −2
  24. net/netfilter/ipset/ip_set_hash_mac.c +2 −2
  25. net/netfilter/ipset/ip_set_hash_net.c +2 −2
  26. net/netfilter/ipset/ip_set_hash_netiface.c +2 −2
  27. net/netfilter/ipset/ip_set_hash_netnet.c +1 −1
  28. net/netfilter/ipset/ip_set_hash_netport.c +2 −2
  29. net/netfilter/ipset/ip_set_hash_netportnet.c +1 −1
  30. net/netfilter/ipset/ip_set_list_set.c +2 −2
  31. net/netfilter/nf_conntrack_h323_main.c +1 −1
  32. net/netfilter/nf_conntrack_proto_tcp.c +1 −1
  33. net/netfilter/xt_iprange.c +2 −2
  34. net/netfilter/xt_set.c +23 −22
CREDITS+1−1
@@ -1800,7 +1800,7 @@ S: 2300 Copenhagen S. · 1799 unmodified lines
18001800 S: Denmark
18011801
18021802 N: Jozsef Kadlecsik
1803−E: kadlec@blackhole.kfki.hu
1803+E: kadlec@netfilter.org
18041804 P: 1024D/470DB964 4CB3 1A05 713E 9BF7 FAC5 5809 DD8C B7B1 470D B964
18051805 D: netfilter: TCP window tracking code
18061806 D: netfilter: raw table
MAINTAINERS+1−1
@@ -10858,7 +10858,7 @@ F: drivers/net/ethernet/neterion/ · 10857 unmodified lines
1085810858
1085910859 NETFILTER
1086010860 M: Pablo Neira Ayuso <pablo@netfilter.org>
10861−M: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
10861+M: Jozsef Kadlecsik <kadlec@netfilter.org>
1086210862 M: Florian Westphal <fw@strlen.de>
1086310863 L: netfilter-devel@vger.kernel.org
1086410864 L: coreteam@netfilter.org
include/linux/jhash.h+1−1
@@ -17,7 +17,7 @@ · 16 unmodified lines
1717 * if SELF_TEST is defined. You can use this free for any purpose. It's in
1818 * the public domain. It has no warranty.
1919 *
20− * Copyright (C) 2009-2010 Jozsef Kadlecsik (kadlec@blackhole.kfki.hu)
20+ * Copyright (C) 2009-2010 Jozsef Kadlecsik (kadlec@netfilter.org)
2121 *
2222 * I've modified Bob's hash to be useful in the Linux kernel, and
2323 * any bugs present are my fault.
include/linux/netfilter/ipset/ip_set.h+1−1
@@ -1,7 +1,7 @@
11 /* Copyright (C) 2000-2002 Joakim Axelsson <gozem@linux.nu>
22 * Patrick Schaaf <bof@bof.de>
33 * Martin Josefsson <gandalf@wlug.westbo.se>
4− * Copyright (C) 2003-2013 Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
4+ * Copyright (C) 2003-2013 Jozsef Kadlecsik <kadlec@netfilter.org>
55 *
66 * This program is free software; you can redistribute it and/or modify
77 * it under the terms of the GNU General Public License version 2 as
include/linux/netfilter/ipset/ip_set_counter.h+1−1
@@ -1,7 +1,7 @@
11 #ifndef _IP_SET_COUNTER_H
22 #define _IP_SET_COUNTER_H
33
4−/* Copyright (C) 2015 Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
4+/* Copyright (C) 2015 Jozsef Kadlecsik <kadlec@netfilter.org>
55 *
66 * This program is free software; you can redistribute it and/or modify
77 * it under the terms of the GNU General Public License version 2 as
include/linux/netfilter/ipset/ip_set_skbinfo.h+1−1
@@ -1,7 +1,7 @@
11 #ifndef _IP_SET_SKBINFO_H
22 #define _IP_SET_SKBINFO_H
33
4−/* Copyright (C) 2015 Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
4+/* Copyright (C) 2015 Jozsef Kadlecsik <kadlec@netfilter.org>
55 *
66 * This program is free software; you can redistribute it and/or modify
77 * it under the terms of the GNU General Public License version 2 as
include/linux/netfilter/ipset/ip_set_timeout.h+1−1
@@ -1,7 +1,7 @@
11 #ifndef _IP_SET_TIMEOUT_H
22 #define _IP_SET_TIMEOUT_H
33
4−/* Copyright (C) 2003-2013 Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
4+/* Copyright (C) 2003-2013 Jozsef Kadlecsik <kadlec@netfilter.org>
55 *
66 * This program is free software; you can redistribute it and/or modify
77 * it under the terms of the GNU General Public License version 2 as
include/uapi/linux/netfilter/ipset/ip_set.h+1−1
@@ -2,7 +2,7 @@ · 1 unmodified line
22 /* Copyright (C) 2000-2002 Joakim Axelsson <gozem@linux.nu>
33 * Patrick Schaaf <bof@bof.de>
44 * Martin Josefsson <gandalf@wlug.westbo.se>
5− * Copyright (C) 2003-2011 Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
5+ * Copyright (C) 2003-2011 Jozsef Kadlecsik <kadlec@netfilter.org>
66 *
77 * This program is free software; you can redistribute it and/or modify
88 * it under the terms of the GNU General Public License version 2 as
net/ipv4/netfilter/iptable_raw.c+1−1
@@ -2,7 +2,7 @@ · 1 unmodified line
22 /*
33 * 'raw' table, which is the very first hooked in at PRE_ROUTING and LOCAL_OUT .
44 *
5− * Copyright (C) 2003 Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
5+ * Copyright (C) 2003 Jozsef Kadlecsik <kadlec@netfilter.org>
66 */
77 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
88 #include <linux/module.h>
net/ipv4/netfilter/nf_nat_h323.c+1−1
@@ -7,7 +7,7 @@ · 6 unmodified lines
77 * This source code is licensed under General Public License version 2.
88 *
99 * Based on the 'brute force' H.323 NAT module by
10− * Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
10+ * Jozsef Kadlecsik <kadlec@netfilter.org>
1111 */
1212
1313 #include <linux/module.h>
net/ipv6/netfilter/ip6table_raw.c+1−1
@@ -2,7 +2,7 @@ · 1 unmodified line
22 /*
33 * IPv6 raw table, a port of the IPv4 raw table to IPv6
44 *
5− * Copyright (C) 2003 Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
5+ * Copyright (C) 2003 Jozsef Kadlecsik <kadlec@netfilter.org>
66 */
77 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
88 #include <linux/module.h>
net/netfilter/ipset/ip_set_bitmap_gen.h+1−1
@@ -1,4 +1,4 @@
1−/* Copyright (C) 2013 Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
1+/* Copyright (C) 2013 Jozsef Kadlecsik <kadlec@netfilter.org>
22 *
33 * This program is free software; you can redistribute it and/or modify
44 * it under the terms of the GNU General Public License version 2 as
net/netfilter/ipset/ip_set_bitmap_ip.c+2−2
@@ -1,6 +1,6 @@
11 /* Copyright (C) 2000-2002 Joakim Axelsson <gozem@linux.nu>
22 * Patrick Schaaf <bof@bof.de>
3− * Copyright (C) 2003-2013 Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
3+ * Copyright (C) 2003-2013 Jozsef Kadlecsik <kadlec@netfilter.org>
44 *
55 * This program is free software; you can redistribute it and/or modify
66 * it under the terms of the GNU General Public License version 2 as
@@ -31,7 +31,7 @@ · 24 unmodified lines
3131 #define IPSET_TYPE_REV_MAX 3 /* skbinfo support added */
3232
3333 MODULE_LICENSE("GPL");
34−MODULE_AUTHOR("Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>");
34+MODULE_AUTHOR("Jozsef Kadlecsik <kadlec@netfilter.org>");
3535 IP_SET_MODULE_DESC("bitmap:ip", IPSET_TYPE_REV_MIN, IPSET_TYPE_REV_MAX);
3636 MODULE_ALIAS("ip_set_bitmap:ip");
3737
net/netfilter/ipset/ip_set_bitmap_ipmac.c+2−2
@@ -1,7 +1,7 @@
11 /* Copyright (C) 2000-2002 Joakim Axelsson <gozem@linux.nu>
22 * Patrick Schaaf <bof@bof.de>
33 * Martin Josefsson <gandalf@wlug.westbo.se>
4− * Copyright (C) 2003-2013 Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
4+ * Copyright (C) 2003-2013 Jozsef Kadlecsik <kadlec@netfilter.org>
55 *
66 * This program is free software; you can redistribute it and/or modify
77 * it under the terms of the GNU General Public License version 2 as
@@ -31,7 +31,7 @@ · 23 unmodified lines
3131 #define IPSET_TYPE_REV_MAX 3 /* skbinfo support added */
3232
3333 MODULE_LICENSE("GPL");
34−MODULE_AUTHOR("Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>");
34+MODULE_AUTHOR("Jozsef Kadlecsik <kadlec@netfilter.org>");
3535 IP_SET_MODULE_DESC("bitmap:ip,mac", IPSET_TYPE_REV_MIN, IPSET_TYPE_REV_MAX);
3636 MODULE_ALIAS("ip_set_bitmap:ip,mac");
3737
net/netfilter/ipset/ip_set_bitmap_port.c+2−2
@@ -1,4 +1,4 @@
1−/* Copyright (C) 2003-2013 Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
1+/* Copyright (C) 2003-2013 Jozsef Kadlecsik <kadlec@netfilter.org>
22 *
33 * This program is free software; you can redistribute it and/or modify
44 * it under the terms of the GNU General Public License version 2 as
@@ -26,7 +26,7 @@ · 21 unmodified lines
2626 #define IPSET_TYPE_REV_MAX 3 /* skbinfo support added */
2727
2828 MODULE_LICENSE("GPL");
29−MODULE_AUTHOR("Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>");
29+MODULE_AUTHOR("Jozsef Kadlecsik <kadlec@netfilter.org>");
3030 IP_SET_MODULE_DESC("bitmap:port", IPSET_TYPE_REV_MIN, IPSET_TYPE_REV_MAX);
3131 MODULE_ALIAS("ip_set_bitmap:port");
3232
net/netfilter/ipset/ip_set_core.c+35−62
@@ -1,6 +1,6 @@
11 /* Copyright (C) 2000-2002 Joakim Axelsson <gozem@linux.nu>
22 * Patrick Schaaf <bof@bof.de>
3− * Copyright (C) 2003-2013 Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
3+ * Copyright (C) 2003-2013 Jozsef Kadlecsik <kadlec@netfilter.org>
44 *
55 * This program is free software; you can redistribute it and/or modify
66 * it under the terms of the GNU General Public License version 2 as
@@ -51,7 +51,7 @@ static unsigned int max_sets; · 44 unmodified lines
5151 module_param(max_sets, int, 0600);
5252 MODULE_PARM_DESC(max_sets, "maximal number of sets");
5353 MODULE_LICENSE("GPL");
54−MODULE_AUTHOR("Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>");
54+MODULE_AUTHOR("Jozsef Kadlecsik <kadlec@netfilter.org>");
5555 MODULE_DESCRIPTION("core IP set support");
5656 MODULE_ALIAS_NFNL_SUBSYS(NFNL_SUBSYS_IPSET);
5757
@@ -1293,11 +1293,13 @@ dump_init(struct netlink_callback *cb, struct ip_set_net *inst) · 1235 unmodified lines
12931293 struct nlattr *attr = (void *)nlh + min_len;
12941294 u32 dump_type;
12951295 ip_set_id_t index;
1296+ int ret;
12961297
1297− /* Second pass, so parser can't fail */
1298− nla_parse_deprecated(cda, IPSET_ATTR_CMD_MAX, attr,
1299− nlh->nlmsg_len - min_len, ip_set_setname_policy,
1300− NULL);
1298+ ret = nla_parse_deprecated(cda, IPSET_ATTR_CMD_MAX, attr,
1299+ nlh->nlmsg_len - min_len,
1300+ ip_set_setname_policy, NULL);
1301+ if (ret)
1302+ return ret;
13011303
13021304 cb->args[IPSET_CB_PROTO] = nla_get_u8(cda[IPSET_ATTR_PROTOCOL]);
13031305 if (cda[IPSET_ATTR_SETNAME]) {
@@ -1544,10 +1546,14 @@ call_ad(struct sock *ctnl, struct sk_buff *skb, struct ip_set *set, · 240 unmodified lines
15441546 memcpy(&errmsg->msg, nlh, nlh->nlmsg_len);
15451547 cmdattr = (void *)&errmsg->msg + min_len;
15461548
1547− nla_parse_deprecated(cda, IPSET_ATTR_CMD_MAX, cmdattr,
1548− nlh->nlmsg_len - min_len,
1549− ip_set_adt_policy, NULL);
1549+ ret = nla_parse_deprecated(cda, IPSET_ATTR_CMD_MAX, cmdattr,
1550+ nlh->nlmsg_len - min_len,
1551+ ip_set_adt_policy, NULL);
15501552
1553+ if (ret) {
1554+ nlmsg_free(skb2);
1555+ return ret;
1556+ }
15511557 errline = nla_data(cda[IPSET_ATTR_LINENO]);
15521558
15531559 *errline = lineno;
@@ -1561,10 +1567,12 @@ call_ad(struct sock *ctnl, struct sk_buff *skb, struct ip_set *set, · 7 unmodified lines
15611567 return ret;
15621568 }
15631569
1564−static int ip_set_uadd(struct net *net, struct sock *ctnl, struct sk_buff *skb,
1565− const struct nlmsghdr *nlh,
1566− const struct nlattr * const attr[],
1567− struct netlink_ext_ack *extack)
1570+static int ip_set_ad(struct net *net, struct sock *ctnl,
1571+ struct sk_buff *skb,
1572+ enum ipset_adt adt,
1573+ const struct nlmsghdr *nlh,
1574+ const struct nlattr * const attr[],
1575+ struct netlink_ext_ack *extack)
15681576 {
15691577 struct ip_set_net *inst = ip_set_pernet(net);
15701578 struct ip_set *set;
@@ -1593,18 +1601,17 @@ static int ip_set_uadd(struct net *net, struct sock *ctnl, struct sk_buff *skb, · 22 unmodified lines
15931601 if (attr[IPSET_ATTR_DATA]) {
15941602 if (nla_parse_nested_deprecated(tb, IPSET_ATTR_ADT_MAX, attr[IPSET_ATTR_DATA], set->type->adt_policy, NULL))
15951603 return -IPSET_ERR_PROTOCOL;
1596− ret = call_ad(ctnl, skb, set, tb, IPSET_ADD, flags,
1604+ ret = call_ad(ctnl, skb, set, tb, adt, flags,
15971605 use_lineno);
15981606 } else {
15991607 int nla_rem;
16001608
16011609 nla_for_each_nested(nla, attr[IPSET_ATTR_ADT], nla_rem) {
1602− memset(tb, 0, sizeof(tb));
16031610 if (nla_type(nla) != IPSET_ATTR_DATA ||
16041611 !flag_nested(nla) ||
16051612 nla_parse_nested_deprecated(tb, IPSET_ATTR_ADT_MAX, nla, set->type->adt_policy, NULL))
16061613 return -IPSET_ERR_PROTOCOL;
1607− ret = call_ad(ctnl, skb, set, tb, IPSET_ADD,
1614+ ret = call_ad(ctnl, skb, set, tb, adt,
16081615 flags, use_lineno);
16091616 if (ret < 0)
16101617 return ret;
@@ -1613,56 +1620,22 @@ static int ip_set_uadd(struct net *net, struct sock *ctnl, struct sk_buff *skb, · 2 unmodified lines
16131620 return ret;
16141621 }
16151622
1616−static int ip_set_udel(struct net *net, struct sock *ctnl, struct sk_buff *skb,
1617− const struct nlmsghdr *nlh,
1623+static int ip_set_uadd(struct net *net, struct sock *ctnl,
1624+ struct sk_buff *skb, const struct nlmsghdr *nlh,
16181625 const struct nlattr * const attr[],
16191626 struct netlink_ext_ack *extack)
16201627 {
1621− struct ip_set_net *inst = ip_set_pernet(net);
1622− struct ip_set *set;
1623− struct nlattr *tb[IPSET_ATTR_ADT_MAX + 1] = {};
1624− const struct nlattr *nla;
1625− u32 flags = flag_exist(nlh);
1626− bool use_lineno;
1627− int ret = 0;
1628−
1629− if (unlikely(protocol_min_failed(attr) ||
1630− !attr[IPSET_ATTR_SETNAME] ||
1631− !((attr[IPSET_ATTR_DATA] != NULL) ^
1632− (attr[IPSET_ATTR_ADT] != NULL)) ||
1633− (attr[IPSET_ATTR_DATA] &&
1634− !flag_nested(attr[IPSET_ATTR_DATA])) ||
1635− (attr[IPSET_ATTR_ADT] &&
1636− (!flag_nested(attr[IPSET_ATTR_ADT]) ||
1637− !attr[IPSET_ATTR_LINENO]))))
1638− return -IPSET_ERR_PROTOCOL;
1639−
1640− set = find_set(inst, nla_data(attr[IPSET_ATTR_SETNAME]));
1641− if (!set)
1642− return -ENOENT;
1643−
1644− use_lineno = !!attr[IPSET_ATTR_LINENO];
1645− if (attr[IPSET_ATTR_DATA]) {
1646− if (nla_parse_nested_deprecated(tb, IPSET_ATTR_ADT_MAX, attr[IPSET_ATTR_DATA], set->type->adt_policy, NULL))
1647− return -IPSET_ERR_PROTOCOL;
1648− ret = call_ad(ctnl, skb, set, tb, IPSET_DEL, flags,
1649− use_lineno);
1650− } else {
1651− int nla_rem;
1628+ return ip_set_ad(net, ctnl, skb,
1629+ IPSET_ADD, nlh, attr, extack);
1630+}
16521631
1653− nla_for_each_nested(nla, attr[IPSET_ATTR_ADT], nla_rem) {
1654− memset(tb, 0, sizeof(*tb));
1655− if (nla_type(nla) != IPSET_ATTR_DATA ||
1656− !flag_nested(nla) ||
1657− nla_parse_nested_deprecated(tb, IPSET_ATTR_ADT_MAX, nla, set->type->adt_policy, NULL))
1658− return -IPSET_ERR_PROTOCOL;
1659− ret = call_ad(ctnl, skb, set, tb, IPSET_DEL,
1660− flags, use_lineno);
1661− if (ret < 0)
1662− return ret;
1663− }
1664− }
1665− return ret;
1632+static int ip_set_udel(struct net *net, struct sock *ctnl,
1633+ struct sk_buff *skb, const struct nlmsghdr *nlh,
1634+ const struct nlattr * const attr[],
1635+ struct netlink_ext_ack *extack)
1636+{
1637+ return ip_set_ad(net, ctnl, skb,
1638+ IPSET_DEL, nlh, attr, extack);
16661639 }
16671640
16681641 static int ip_set_utest(struct net *net, struct sock *ctnl, struct sk_buff *skb,
net/netfilter/ipset/ip_set_getport.c+1−1
@@ -1,4 +1,4 @@
1−/* Copyright (C) 2003-2011 Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
1+/* Copyright (C) 2003-2011 Jozsef Kadlecsik <kadlec@netfilter.org>
22 *
33 * This program is free software; you can redistribute it and/or modify
44 * it under the terms of the GNU General Public License version 2 as
net/netfilter/ipset/ip_set_hash_gen.h+2−2
@@ -1,4 +1,4 @@
1−/* Copyright (C) 2013 Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
1+/* Copyright (C) 2013 Jozsef Kadlecsik <kadlec@netfilter.org>
22 *
33 * This program is free software; you can redistribute it and/or modify
44 * it under the terms of the GNU General Public License version 2 as
@@ -625,7 +625,7 @@ retry: · 620 unmodified lines
625625 goto cleanup;
626626 }
627627 m->size = AHASH_INIT_SIZE;
628− extsize = ext_size(AHASH_INIT_SIZE, dsize);
628+ extsize += ext_size(AHASH_INIT_SIZE, dsize);
629629 RCU_INIT_POINTER(hbucket(t, key), m);
630630 } else if (m->pos >= m->size) {
631631 struct hbucket *ht;
net/netfilter/ipset/ip_set_hash_ip.c+2−2
@@ -1,4 +1,4 @@
1−/* Copyright (C) 2003-2013 Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
1+/* Copyright (C) 2003-2013 Jozsef Kadlecsik <kadlec@netfilter.org>
22 *
33 * This program is free software; you can redistribute it and/or modify
44 * it under the terms of the GNU General Public License version 2 as
@@ -30,7 +30,7 @@ · 25 unmodified lines
3030 #define IPSET_TYPE_REV_MAX 4 /* skbinfo support */
3131
3232 MODULE_LICENSE("GPL");
33−MODULE_AUTHOR("Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>");
33+MODULE_AUTHOR("Jozsef Kadlecsik <kadlec@netfilter.org>");
3434 IP_SET_MODULE_DESC("hash:ip", IPSET_TYPE_REV_MIN, IPSET_TYPE_REV_MAX);
3535 MODULE_ALIAS("ip_set_hash:ip");
3636
net/netfilter/ipset/ip_set_hash_ipmark.c+1−1
@@ -1,4 +1,4 @@
1−/* Copyright (C) 2003-2013 Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
1+/* Copyright (C) 2003-2013 Jozsef Kadlecsik <kadlec@netfilter.org>
22 * Copyright (C) 2013 Smoothwall Ltd. <vytas.dauksa@smoothwall.net>
33 *
44 * This program is free software; you can redistribute it and/or modify
net/netfilter/ipset/ip_set_hash_ipport.c+2−2
@@ -1,4 +1,4 @@
1−/* Copyright (C) 2003-2013 Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
1+/* Copyright (C) 2003-2013 Jozsef Kadlecsik <kadlec@netfilter.org>
22 *
33 * This program is free software; you can redistribute it and/or modify
44 * it under the terms of the GNU General Public License version 2 as
@@ -32,7 +32,7 @@ · 27 unmodified lines
3232 #define IPSET_TYPE_REV_MAX 5 /* skbinfo support added */
3333
3434 MODULE_LICENSE("GPL");
35−MODULE_AUTHOR("Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>");
35+MODULE_AUTHOR("Jozsef Kadlecsik <kadlec@netfilter.org>");
3636 IP_SET_MODULE_DESC("hash:ip,port", IPSET_TYPE_REV_MIN, IPSET_TYPE_REV_MAX);
3737 MODULE_ALIAS("ip_set_hash:ip,port");
3838
net/netfilter/ipset/ip_set_hash_ipportip.c+2−2
@@ -1,4 +1,4 @@
1−/* Copyright (C) 2003-2013 Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
1+/* Copyright (C) 2003-2013 Jozsef Kadlecsik <kadlec@netfilter.org>
22 *
33 * This program is free software; you can redistribute it and/or modify
44 * it under the terms of the GNU General Public License version 2 as
@@ -32,7 +32,7 @@ · 27 unmodified lines
3232 #define IPSET_TYPE_REV_MAX 5 /* skbinfo support added */
3333
3434 MODULE_LICENSE("GPL");
35−MODULE_AUTHOR("Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>");
35+MODULE_AUTHOR("Jozsef Kadlecsik <kadlec@netfilter.org>");
3636 IP_SET_MODULE_DESC("hash:ip,port,ip", IPSET_TYPE_REV_MIN, IPSET_TYPE_REV_MAX);
3737 MODULE_ALIAS("ip_set_hash:ip,port,ip");
3838
net/netfilter/ipset/ip_set_hash_ipportnet.c+2−2
@@ -1,4 +1,4 @@
1−/* Copyright (C) 2003-2013 Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
1+/* Copyright (C) 2003-2013 Jozsef Kadlecsik <kadlec@netfilter.org>
22 *
33 * This program is free software; you can redistribute it and/or modify
44 * it under the terms of the GNU General Public License version 2 as
@@ -34,7 +34,7 @@ · 29 unmodified lines
3434 #define IPSET_TYPE_REV_MAX 7 /* skbinfo support added */
3535
3636 MODULE_LICENSE("GPL");
37−MODULE_AUTHOR("Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>");
37+MODULE_AUTHOR("Jozsef Kadlecsik <kadlec@netfilter.org>");
3838 IP_SET_MODULE_DESC("hash:ip,port,net", IPSET_TYPE_REV_MIN, IPSET_TYPE_REV_MAX);
3939 MODULE_ALIAS("ip_set_hash:ip,port,net");
4040
net/netfilter/ipset/ip_set_hash_mac.c+2−2
@@ -1,4 +1,4 @@
1−/* Copyright (C) 2014 Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
1+/* Copyright (C) 2014 Jozsef Kadlecsik <kadlec@netfilter.org>
22 *
33 * This program is free software; you can redistribute it and/or modify
44 * it under the terms of the GNU General Public License version 2 as
@@ -23,7 +23,7 @@ · 18 unmodified lines
2323 #define IPSET_TYPE_REV_MAX 0
2424
2525 MODULE_LICENSE("GPL");
26−MODULE_AUTHOR("Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>");
26+MODULE_AUTHOR("Jozsef Kadlecsik <kadlec@netfilter.org>");
2727 IP_SET_MODULE_DESC("hash:mac", IPSET_TYPE_REV_MIN, IPSET_TYPE_REV_MAX);
2828 MODULE_ALIAS("ip_set_hash:mac");
2929
net/netfilter/ipset/ip_set_hash_net.c+2−2
@@ -1,4 +1,4 @@
1−/* Copyright (C) 2003-2013 Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
1+/* Copyright (C) 2003-2013 Jozsef Kadlecsik <kadlec@netfilter.org>
22 *
33 * This program is free software; you can redistribute it and/or modify
44 * it under the terms of the GNU General Public License version 2 as
@@ -31,7 +31,7 @@ · 26 unmodified lines
3131 #define IPSET_TYPE_REV_MAX 6 /* skbinfo mapping support added */
3232
3333 MODULE_LICENSE("GPL");
34−MODULE_AUTHOR("Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>");
34+MODULE_AUTHOR("Jozsef Kadlecsik <kadlec@netfilter.org>");
3535 IP_SET_MODULE_DESC("hash:net", IPSET_TYPE_REV_MIN, IPSET_TYPE_REV_MAX);
3636 MODULE_ALIAS("ip_set_hash:net");
3737
net/netfilter/ipset/ip_set_hash_netiface.c+2−2
@@ -1,4 +1,4 @@
1−/* Copyright (C) 2011-2013 Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
1+/* Copyright (C) 2011-2013 Jozsef Kadlecsik <kadlec@netfilter.org>
22 *
33 * This program is free software; you can redistribute it and/or modify
44 * it under the terms of the GNU General Public License version 2 as
@@ -32,7 +32,7 @@ · 27 unmodified lines
3232 #define IPSET_TYPE_REV_MAX 6 /* skbinfo support added */
3333
3434 MODULE_LICENSE("GPL");
35−MODULE_AUTHOR("Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>");
35+MODULE_AUTHOR("Jozsef Kadlecsik <kadlec@netfilter.org>");
3636 IP_SET_MODULE_DESC("hash:net,iface", IPSET_TYPE_REV_MIN, IPSET_TYPE_REV_MAX);
3737 MODULE_ALIAS("ip_set_hash:net,iface");
3838
net/netfilter/ipset/ip_set_hash_netnet.c+1−1
@@ -1,4 +1,4 @@
1−/* Copyright (C) 2003-2013 Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
1+/* Copyright (C) 2003-2013 Jozsef Kadlecsik <kadlec@netfilter.org>
22 * Copyright (C) 2013 Oliver Smith <oliver@8.c.9.b.0.7.4.0.1.0.0.2.ip6.arpa>
33 *
44 * This program is free software; you can redistribute it and/or modify
net/netfilter/ipset/ip_set_hash_netport.c+2−2
@@ -1,4 +1,4 @@
1−/* Copyright (C) 2003-2013 Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
1+/* Copyright (C) 2003-2013 Jozsef Kadlecsik <kadlec@netfilter.org>
22 *
33 * This program is free software; you can redistribute it and/or modify
44 * it under the terms of the GNU General Public License version 2 as
@@ -33,7 +33,7 @@ · 28 unmodified lines
3333 #define IPSET_TYPE_REV_MAX 7 /* skbinfo support added */
3434
3535 MODULE_LICENSE("GPL");
36−MODULE_AUTHOR("Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>");
36+MODULE_AUTHOR("Jozsef Kadlecsik <kadlec@netfilter.org>");
3737 IP_SET_MODULE_DESC("hash:net,port", IPSET_TYPE_REV_MIN, IPSET_TYPE_REV_MAX);
3838 MODULE_ALIAS("ip_set_hash:net,port");
3939
net/netfilter/ipset/ip_set_hash_netportnet.c+1−1
@@ -1,4 +1,4 @@
1−/* Copyright (C) 2003-2013 Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
1+/* Copyright (C) 2003-2013 Jozsef Kadlecsik <kadlec@netfilter.org>
22 *
33 * This program is free software; you can redistribute it and/or modify
44 * it under the terms of the GNU General Public License version 2 as
net/netfilter/ipset/ip_set_list_set.c+2−2
@@ -1,4 +1,4 @@
1−/* Copyright (C) 2008-2013 Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
1+/* Copyright (C) 2008-2013 Jozsef Kadlecsik <kadlec@netfilter.org>
22 *
33 * This program is free software; you can redistribute it and/or modify
44 * it under the terms of the GNU General Public License version 2 as
@@ -22,7 +22,7 @@ · 17 unmodified lines
2222 #define IPSET_TYPE_REV_MAX 3 /* skbinfo support added */
2323
2424 MODULE_LICENSE("GPL");
25−MODULE_AUTHOR("Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>");
25+MODULE_AUTHOR("Jozsef Kadlecsik <kadlec@netfilter.org>");
2626 IP_SET_MODULE_DESC("list:set", IPSET_TYPE_REV_MIN, IPSET_TYPE_REV_MAX);
2727 MODULE_ALIAS("ip_set_list:set");
2828
net/netfilter/nf_conntrack_h323_main.c+1−1
@@ -7,7 +7,7 @@ · 6 unmodified lines
77 * This source code is licensed under General Public License version 2.
88 *
99 * Based on the 'brute force' H.323 connection tracking module by
10− * Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
10+ * Jozsef Kadlecsik <kadlec@netfilter.org>
1111 *
1212 * For more information, please see http://nath323.sourceforge.net/
1313 */
net/netfilter/nf_conntrack_proto_tcp.c+1−1
@@ -1,6 +1,6 @@
11 /* (C) 1999-2001 Paul `Rusty' Russell
22 * (C) 2002-2004 Netfilter Core Team <coreteam@netfilter.org>
3− * (C) 2002-2013 Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
3+ * (C) 2002-2013 Jozsef Kadlecsik <kadlec@netfilter.org>
44 * (C) 2006-2012 Patrick McHardy <kaber@trash.net>
55 *
66 * This program is free software; you can redistribute it and/or modify
net/netfilter/xt_iprange.c+2−2
@@ -1,7 +1,7 @@
11 /*
22 * xt_iprange - Netfilter module to match IP address ranges
33 *
4− * (C) 2003 Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
4+ * (C) 2003 Jozsef Kadlecsik <kadlec@netfilter.org>
55 * (C) CC Computer Consultants GmbH, 2008
66 *
77 * This program is free software; you can redistribute it and/or modify
@@ -133,7 +133,7 @@ static void __exit iprange_mt_exit(void) · 125 unmodified lines
133133 module_init(iprange_mt_init);
134134 module_exit(iprange_mt_exit);
135135 MODULE_LICENSE("GPL");
136−MODULE_AUTHOR("Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>");
136+MODULE_AUTHOR("Jozsef Kadlecsik <kadlec@netfilter.org>");
137137 MODULE_AUTHOR("Jan Engelhardt <jengelh@medozas.de>");
138138 MODULE_DESCRIPTION("Xtables: arbitrary IPv4 range matching");
139139 MODULE_ALIAS("ipt_iprange");
net/netfilter/xt_set.c+23−22
@@ -1,7 +1,7 @@
11 /* Copyright (C) 2000-2002 Joakim Axelsson <gozem@linux.nu>
22 * Patrick Schaaf <bof@bof.de>
33 * Martin Josefsson <gandalf@wlug.westbo.se>
4− * Copyright (C) 2003-2013 Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
4+ * Copyright (C) 2003-2013 Jozsef Kadlecsik <kadlec@netfilter.org>
55 *
66 * This program is free software; you can redistribute it and/or modify
77 * it under the terms of the GNU General Public License version 2 as
@@ -21,7 +21,7 @@ · 13 unmodified lines
2121 #include <uapi/linux/netfilter/xt_set.h>
2222
2323 MODULE_LICENSE("GPL");
24−MODULE_AUTHOR("Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>");
24+MODULE_AUTHOR("Jozsef Kadlecsik <kadlec@netfilter.org>");
2525 MODULE_DESCRIPTION("Xtables: IP set match and target module");
2626 MODULE_ALIAS("xt_SET");
2727 MODULE_ALIAS("ipt_set");
@@ -439,6 +439,7 @@ set_target_v3_checkentry(const struct xt_tgchk_param *par) · 411 unmodified lines
439439 {
440440 const struct xt_set_info_target_v3 *info = par->targinfo;
441441 ip_set_id_t index;
442+ int ret = 0;
442443
443444 if (info->add_set.index != IPSET_INVALID_ID) {
444445 index = ip_set_nfnl_get_byindex(par->net,
@@ -456,17 +457,16 @@ set_target_v3_checkentry(const struct xt_tgchk_param *par) · 11 unmodified lines
456457 if (index == IPSET_INVALID_ID) {
457458 pr_info_ratelimited("Cannot find del_set index %u as target\n",
458459 info->del_set.index);
459− if (info->add_set.index != IPSET_INVALID_ID)
460− ip_set_nfnl_put(par->net,
461− info->add_set.index);
462− return -ENOENT;
460+ ret = -ENOENT;
461+ goto cleanup_add;
463462 }
464463 }
465464
466465 if (info->map_set.index != IPSET_INVALID_ID) {
467466 if (strncmp(par->table, "mangle", 7)) {
468467 pr_info_ratelimited("--map-set only usable from mangle table\n");
469− return -EINVAL;
468+ ret = -EINVAL;
469+ goto cleanup_del;
470470 }
471471 if (((info->flags & IPSET_FLAG_MAP_SKBPRIO) |
472472 (info->flags & IPSET_FLAG_MAP_SKBQUEUE)) &&
@@ -474,20 +474,16 @@ set_target_v3_checkentry(const struct xt_tgchk_param *par) · 1 unmodified line
474474 1 << NF_INET_LOCAL_OUT |
475475 1 << NF_INET_POST_ROUTING))) {
476476 pr_info_ratelimited("mapping of prio or/and queue is allowed only from OUTPUT/FORWARD/POSTROUTING chains\n");
477− return -EINVAL;
477+ ret = -EINVAL;
478+ goto cleanup_del;
478479 }
479480 index = ip_set_nfnl_get_byindex(par->net,
480481 info->map_set.index);
481482 if (index == IPSET_INVALID_ID) {
482483 pr_info_ratelimited("Cannot find map_set index %u as target\n",
483484 info->map_set.index);
484− if (info->add_set.index != IPSET_INVALID_ID)
485− ip_set_nfnl_put(par->net,
486− info->add_set.index);
487− if (info->del_set.index != IPSET_INVALID_ID)
488− ip_set_nfnl_put(par->net,
489− info->del_set.index);
490− return -ENOENT;
485+ ret = -ENOENT;
486+ goto cleanup_del;
491487 }
492488 }
493489
@@ -495,16 +491,21 @@ set_target_v3_checkentry(const struct xt_tgchk_param *par) · 1 unmodified line
495491 info->del_set.dim > IPSET_DIM_MAX ||
496492 info->map_set.dim > IPSET_DIM_MAX) {
497493 pr_info_ratelimited("SET target dimension over the limit!\n");
498− if (info->add_set.index != IPSET_INVALID_ID)
499− ip_set_nfnl_put(par->net, info->add_set.index);
500− if (info->del_set.index != IPSET_INVALID_ID)
501− ip_set_nfnl_put(par->net, info->del_set.index);
502− if (info->map_set.index != IPSET_INVALID_ID)
503− ip_set_nfnl_put(par->net, info->map_set.index);
504− return -ERANGE;
494+ ret = -ERANGE;
495+ goto cleanup_mark;
505496 }
506497
507498 return 0;
499+cleanup_mark:
500+ if (info->map_set.index != IPSET_INVALID_ID)
501+ ip_set_nfnl_put(par->net, info->map_set.index);
502+cleanup_del:
503+ if (info->del_set.index != IPSET_INVALID_ID)
504+ ip_set_nfnl_put(par->net, info->del_set.index);
505+cleanup_add:
506+ if (info->add_set.index != IPSET_INVALID_ID)
507+ ip_set_nfnl_put(par->net, info->add_set.index);
508+ return ret;
508509 }
509510
510511 static void