aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-04-17 11:50:59 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-04-17 11:50:59 -0400
commitfca83168aae6fa0c36a923ef99311587ad5b54f2 (patch)
treeb6118d7d0fc56cf819ca69c63983aea999109ee4 /include/linux
parent4f2e29031e6c67802e7370292dd050fd62f337ee (diff)
parent361cd29cf9363505c2a35bbf9a034a22feebfb07 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: 1) Fix erroneous netfilter drop of SIP packets generated by some Cisco phones, from Patrick McHardy. 2) Fix netfilter IPSET refcounting in list_set_add(), from Jozsef Kadlecsik. 3) Fix TCP syncookies route lookup key, we don't use the same values we would use for the usual SYN receive processing, from Dmitry Popov. 4) Fix NULL deref in bond_slave_netdev_event(), from Nikolay Aleksandrov. 5) When bonding enslave fails, we can forget to clear the IFF_BONDING bit, fix also from Nikolay Aleksandrov. 6) skb->csum_start is 16-bits, which is almost always just fine. But if we reallocate the headroom of an SKB this can push the skb->csum_start value outside of it's valid range. This can easily happen when collapsing multiple SKBs from the retransmit queue together. Fix from Thomas Graf. 7) Fix NULL deref in be2net driver due to missing check of __vlan_put_tag() return value, from Ivan Vecera. 8) tun_set_iff() returns zero instead of error code on failure, fix from Wei Yongjun. 9) Like GARP, 802 MRP needs to hold the app->lock when adding MAD events and queueing PDUs. Fix from David Ward. 10) Build fix, MVMDIO needs PHYLIB, from Thomas Petazzoni.. 11) Fix mac80211 static with ipv6 modular build, from Cong Wang. 12) If userland specifies a path cost explicitly, do not override it when the carrier state changes. From Stephen Hemminger. 13) mvnets calculates the TX queue to use incorrectly resulting in garbage pointer derefs and crashes, fix from Willy Tarreau. 14) cdc_mbim does erroneous sizeof(ETH_HLEN). Fix from Bjorn Mork. 15) IP fragmentation can leak a refcount-less route out from an RCU protected section. This results in crashes and all sorts of hard to diagnose behavior. Fix from Eric Dumazet. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (24 commits) qlcnic: fix beaconing test for 82xx adapter net: drop dst before queueing fragments net: fec: fix regression in link change accounting net: cdc_mbim: remove bogus sizeof() drivers: net: ethernet: cpsw: get slave VLAN id from slave node instead of cpsw node net: mvneta: fix improper tx queue usage in mvneta_tx() esp4: fix error return code in esp_output() bridge: make user modified path cost sticky ipv6: statically link register_inet6addr_notifier() net: mvmdio: add select PHYLIB net/802/mrp: fix possible race condition when calling mrp_pdu_queue() tuntap: fix error return code in tun_set_iff() be2net: take care of __vlan_put_tag return value can: sja1000: fix handling on dt properties on little endian systems can: mcp251x: add missing IRQF_ONESHOT to request_threaded_irq netfilter: nf_nat: fix race when unloading protocol modules tcp: Reallocate headroom if it would overflow csum_start stmmac: prevent interrupt loop with MMC RX IPC Counter bonding: IFF_BONDING is not stripped on enslave failure bonding: fix netdev event NULL pointer dereference ...
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/netfilter/ipset/ip_set_ahash.h30
1 files changed, 23 insertions, 7 deletions
diff --git a/include/linux/netfilter/ipset/ip_set_ahash.h b/include/linux/netfilter/ipset/ip_set_ahash.h
index 01d25e6fc792..0214c4c146fa 100644
--- a/include/linux/netfilter/ipset/ip_set_ahash.h
+++ b/include/linux/netfilter/ipset/ip_set_ahash.h
@@ -291,6 +291,7 @@ ip_set_hash_destroy(struct ip_set *set)
291#define type_pf_data_tlist TOKEN(TYPE, PF, _data_tlist) 291#define type_pf_data_tlist TOKEN(TYPE, PF, _data_tlist)
292#define type_pf_data_next TOKEN(TYPE, PF, _data_next) 292#define type_pf_data_next TOKEN(TYPE, PF, _data_next)
293#define type_pf_data_flags TOKEN(TYPE, PF, _data_flags) 293#define type_pf_data_flags TOKEN(TYPE, PF, _data_flags)
294#define type_pf_data_reset_flags TOKEN(TYPE, PF, _data_reset_flags)
294#ifdef IP_SET_HASH_WITH_NETS 295#ifdef IP_SET_HASH_WITH_NETS
295#define type_pf_data_match TOKEN(TYPE, PF, _data_match) 296#define type_pf_data_match TOKEN(TYPE, PF, _data_match)
296#else 297#else
@@ -385,9 +386,9 @@ type_pf_resize(struct ip_set *set, bool retried)
385 struct ip_set_hash *h = set->data; 386 struct ip_set_hash *h = set->data;
386 struct htable *t, *orig = h->table; 387 struct htable *t, *orig = h->table;
387 u8 htable_bits = orig->htable_bits; 388 u8 htable_bits = orig->htable_bits;
388 const struct type_pf_elem *data; 389 struct type_pf_elem *data;
389 struct hbucket *n, *m; 390 struct hbucket *n, *m;
390 u32 i, j; 391 u32 i, j, flags = 0;
391 int ret; 392 int ret;
392 393
393retry: 394retry:
@@ -412,9 +413,16 @@ retry:
412 n = hbucket(orig, i); 413 n = hbucket(orig, i);
413 for (j = 0; j < n->pos; j++) { 414 for (j = 0; j < n->pos; j++) {
414 data = ahash_data(n, j); 415 data = ahash_data(n, j);
416#ifdef IP_SET_HASH_WITH_NETS
417 flags = 0;
418 type_pf_data_reset_flags(data, &flags);
419#endif
415 m = hbucket(t, HKEY(data, h->initval, htable_bits)); 420 m = hbucket(t, HKEY(data, h->initval, htable_bits));
416 ret = type_pf_elem_add(m, data, AHASH_MAX(h), 0); 421 ret = type_pf_elem_add(m, data, AHASH_MAX(h), flags);
417 if (ret < 0) { 422 if (ret < 0) {
423#ifdef IP_SET_HASH_WITH_NETS
424 type_pf_data_flags(data, flags);
425#endif
418 read_unlock_bh(&set->lock); 426 read_unlock_bh(&set->lock);
419 ahash_destroy(t); 427 ahash_destroy(t);
420 if (ret == -EAGAIN) 428 if (ret == -EAGAIN)
@@ -836,9 +844,9 @@ type_pf_tresize(struct ip_set *set, bool retried)
836 struct ip_set_hash *h = set->data; 844 struct ip_set_hash *h = set->data;
837 struct htable *t, *orig = h->table; 845 struct htable *t, *orig = h->table;
838 u8 htable_bits = orig->htable_bits; 846 u8 htable_bits = orig->htable_bits;
839 const struct type_pf_elem *data; 847 struct type_pf_elem *data;
840 struct hbucket *n, *m; 848 struct hbucket *n, *m;
841 u32 i, j; 849 u32 i, j, flags = 0;
842 int ret; 850 int ret;
843 851
844 /* Try to cleanup once */ 852 /* Try to cleanup once */
@@ -873,10 +881,17 @@ retry:
873 n = hbucket(orig, i); 881 n = hbucket(orig, i);
874 for (j = 0; j < n->pos; j++) { 882 for (j = 0; j < n->pos; j++) {
875 data = ahash_tdata(n, j); 883 data = ahash_tdata(n, j);
884#ifdef IP_SET_HASH_WITH_NETS
885 flags = 0;
886 type_pf_data_reset_flags(data, &flags);
887#endif
876 m = hbucket(t, HKEY(data, h->initval, htable_bits)); 888 m = hbucket(t, HKEY(data, h->initval, htable_bits));
877 ret = type_pf_elem_tadd(m, data, AHASH_MAX(h), 0, 889 ret = type_pf_elem_tadd(m, data, AHASH_MAX(h), flags,
878 ip_set_timeout_get(type_pf_data_timeout(data))); 890 ip_set_timeout_get(type_pf_data_timeout(data)));
879 if (ret < 0) { 891 if (ret < 0) {
892#ifdef IP_SET_HASH_WITH_NETS
893 type_pf_data_flags(data, flags);
894#endif
880 read_unlock_bh(&set->lock); 895 read_unlock_bh(&set->lock);
881 ahash_destroy(t); 896 ahash_destroy(t);
882 if (ret == -EAGAIN) 897 if (ret == -EAGAIN)
@@ -1187,6 +1202,7 @@ type_pf_gc_init(struct ip_set *set)
1187#undef type_pf_data_tlist 1202#undef type_pf_data_tlist
1188#undef type_pf_data_next 1203#undef type_pf_data_next
1189#undef type_pf_data_flags 1204#undef type_pf_data_flags
1205#undef type_pf_data_reset_flags
1190#undef type_pf_data_match 1206#undef type_pf_data_match
1191 1207
1192#undef type_pf_elem 1208#undef type_pf_elem