diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-07-21 04:22:45 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-07-21 04:22:45 -0400 |
commit | 14764b01a5576ce23a9d0c95a027049206a19cef (patch) | |
tree | fa7f4e3b9b62598076baf7d312dd37d6c91b0d56 /net | |
parent | fc4978b796e5e52ab3a709495a968199afe0a108 (diff) | |
parent | 5ccd4302a20bfe56eb72a5e27ad0be046fc820a5 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/nico/orion into devel-stable
Diffstat (limited to 'net')
-rw-r--r-- | net/bluetooth/bnep/netdev.c | 2 | ||||
-rw-r--r-- | net/bridge/br_fdb.c | 6 | ||||
-rw-r--r-- | net/bridge/br_forward.c | 4 | ||||
-rw-r--r-- | net/bridge/br_multicast.c | 21 | ||||
-rw-r--r-- | net/bridge/br_netfilter.c | 3 | ||||
-rw-r--r-- | net/core/dev.c | 18 | ||||
-rw-r--r-- | net/core/ethtool.c | 41 | ||||
-rw-r--r-- | net/core/skbuff.c | 2 | ||||
-rw-r--r-- | net/ipv4/ip_output.c | 9 | ||||
-rw-r--r-- | net/ipv4/xfrm4_policy.c | 2 | ||||
-rw-r--r-- | net/ipv6/ndisc.c | 2 | ||||
-rw-r--r-- | net/ipv6/netfilter/ip6t_REJECT.c | 6 | ||||
-rw-r--r-- | net/ipv6/xfrm6_policy.c | 2 | ||||
-rw-r--r-- | net/mac80211/work.c | 2 | ||||
-rw-r--r-- | net/netfilter/ipvs/ip_vs_conn.c | 4 | ||||
-rw-r--r-- | net/sched/sch_teql.c | 1 | ||||
-rw-r--r-- | net/sunrpc/xprtsock.c | 38 | ||||
-rw-r--r-- | net/xfrm/xfrm_policy.c | 3 |
18 files changed, 115 insertions, 51 deletions
diff --git a/net/bluetooth/bnep/netdev.c b/net/bluetooth/bnep/netdev.c index 0faad5ce6dc4..8c100c9dae28 100644 --- a/net/bluetooth/bnep/netdev.c +++ b/net/bluetooth/bnep/netdev.c | |||
@@ -104,6 +104,8 @@ static void bnep_net_set_mc_list(struct net_device *dev) | |||
104 | break; | 104 | break; |
105 | memcpy(__skb_put(skb, ETH_ALEN), ha->addr, ETH_ALEN); | 105 | memcpy(__skb_put(skb, ETH_ALEN), ha->addr, ETH_ALEN); |
106 | memcpy(__skb_put(skb, ETH_ALEN), ha->addr, ETH_ALEN); | 106 | memcpy(__skb_put(skb, ETH_ALEN), ha->addr, ETH_ALEN); |
107 | |||
108 | i++; | ||
107 | } | 109 | } |
108 | r->len = htons(skb->len - len); | 110 | r->len = htons(skb->len - len); |
109 | } | 111 | } |
diff --git a/net/bridge/br_fdb.c b/net/bridge/br_fdb.c index 26637439965b..b01dde35a69e 100644 --- a/net/bridge/br_fdb.c +++ b/net/bridge/br_fdb.c | |||
@@ -128,7 +128,7 @@ void br_fdb_cleanup(unsigned long _data) | |||
128 | { | 128 | { |
129 | struct net_bridge *br = (struct net_bridge *)_data; | 129 | struct net_bridge *br = (struct net_bridge *)_data; |
130 | unsigned long delay = hold_time(br); | 130 | unsigned long delay = hold_time(br); |
131 | unsigned long next_timer = jiffies + br->forward_delay; | 131 | unsigned long next_timer = jiffies + br->ageing_time; |
132 | int i; | 132 | int i; |
133 | 133 | ||
134 | spin_lock_bh(&br->hash_lock); | 134 | spin_lock_bh(&br->hash_lock); |
@@ -149,9 +149,7 @@ void br_fdb_cleanup(unsigned long _data) | |||
149 | } | 149 | } |
150 | spin_unlock_bh(&br->hash_lock); | 150 | spin_unlock_bh(&br->hash_lock); |
151 | 151 | ||
152 | /* Add HZ/4 to ensure we round the jiffies upwards to be after the next | 152 | mod_timer(&br->gc_timer, round_jiffies_up(next_timer)); |
153 | * timer, otherwise we might round down and will have no-op run. */ | ||
154 | mod_timer(&br->gc_timer, round_jiffies(next_timer + HZ/4)); | ||
155 | } | 153 | } |
156 | 154 | ||
157 | /* Completely flush all dynamic entries in forwarding database.*/ | 155 | /* Completely flush all dynamic entries in forwarding database.*/ |
diff --git a/net/bridge/br_forward.c b/net/bridge/br_forward.c index a98ef1393097..a4e72a89e4ff 100644 --- a/net/bridge/br_forward.c +++ b/net/bridge/br_forward.c | |||
@@ -140,10 +140,10 @@ static int deliver_clone(const struct net_bridge_port *prev, | |||
140 | void (*__packet_hook)(const struct net_bridge_port *p, | 140 | void (*__packet_hook)(const struct net_bridge_port *p, |
141 | struct sk_buff *skb)) | 141 | struct sk_buff *skb)) |
142 | { | 142 | { |
143 | struct net_device *dev = BR_INPUT_SKB_CB(skb)->brdev; | ||
144 | |||
143 | skb = skb_clone(skb, GFP_ATOMIC); | 145 | skb = skb_clone(skb, GFP_ATOMIC); |
144 | if (!skb) { | 146 | if (!skb) { |
145 | struct net_device *dev = BR_INPUT_SKB_CB(skb)->brdev; | ||
146 | |||
147 | dev->stats.tx_dropped++; | 147 | dev->stats.tx_dropped++; |
148 | return -ENOMEM; | 148 | return -ENOMEM; |
149 | } | 149 | } |
diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c index 9d21d98ae5fa..27ae946363f1 100644 --- a/net/bridge/br_multicast.c +++ b/net/bridge/br_multicast.c | |||
@@ -99,6 +99,15 @@ static struct net_bridge_mdb_entry *__br_mdb_ip_get( | |||
99 | return NULL; | 99 | return NULL; |
100 | } | 100 | } |
101 | 101 | ||
102 | static struct net_bridge_mdb_entry *br_mdb_ip_get( | ||
103 | struct net_bridge_mdb_htable *mdb, struct br_ip *dst) | ||
104 | { | ||
105 | if (!mdb) | ||
106 | return NULL; | ||
107 | |||
108 | return __br_mdb_ip_get(mdb, dst, br_ip_hash(mdb, dst)); | ||
109 | } | ||
110 | |||
102 | static struct net_bridge_mdb_entry *br_mdb_ip4_get( | 111 | static struct net_bridge_mdb_entry *br_mdb_ip4_get( |
103 | struct net_bridge_mdb_htable *mdb, __be32 dst) | 112 | struct net_bridge_mdb_htable *mdb, __be32 dst) |
104 | { | 113 | { |
@@ -107,7 +116,7 @@ static struct net_bridge_mdb_entry *br_mdb_ip4_get( | |||
107 | br_dst.u.ip4 = dst; | 116 | br_dst.u.ip4 = dst; |
108 | br_dst.proto = htons(ETH_P_IP); | 117 | br_dst.proto = htons(ETH_P_IP); |
109 | 118 | ||
110 | return __br_mdb_ip_get(mdb, &br_dst, __br_ip4_hash(mdb, dst)); | 119 | return br_mdb_ip_get(mdb, &br_dst); |
111 | } | 120 | } |
112 | 121 | ||
113 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 122 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) |
@@ -119,23 +128,17 @@ static struct net_bridge_mdb_entry *br_mdb_ip6_get( | |||
119 | ipv6_addr_copy(&br_dst.u.ip6, dst); | 128 | ipv6_addr_copy(&br_dst.u.ip6, dst); |
120 | br_dst.proto = htons(ETH_P_IPV6); | 129 | br_dst.proto = htons(ETH_P_IPV6); |
121 | 130 | ||
122 | return __br_mdb_ip_get(mdb, &br_dst, __br_ip6_hash(mdb, dst)); | 131 | return br_mdb_ip_get(mdb, &br_dst); |
123 | } | 132 | } |
124 | #endif | 133 | #endif |
125 | 134 | ||
126 | static struct net_bridge_mdb_entry *br_mdb_ip_get( | ||
127 | struct net_bridge_mdb_htable *mdb, struct br_ip *dst) | ||
128 | { | ||
129 | return __br_mdb_ip_get(mdb, dst, br_ip_hash(mdb, dst)); | ||
130 | } | ||
131 | |||
132 | struct net_bridge_mdb_entry *br_mdb_get(struct net_bridge *br, | 135 | struct net_bridge_mdb_entry *br_mdb_get(struct net_bridge *br, |
133 | struct sk_buff *skb) | 136 | struct sk_buff *skb) |
134 | { | 137 | { |
135 | struct net_bridge_mdb_htable *mdb = br->mdb; | 138 | struct net_bridge_mdb_htable *mdb = br->mdb; |
136 | struct br_ip ip; | 139 | struct br_ip ip; |
137 | 140 | ||
138 | if (!mdb || br->multicast_disabled) | 141 | if (br->multicast_disabled) |
139 | return NULL; | 142 | return NULL; |
140 | 143 | ||
141 | if (BR_INPUT_SKB_CB(skb)->igmp) | 144 | if (BR_INPUT_SKB_CB(skb)->igmp) |
diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c index 44420992f72f..8fb75f89c4aa 100644 --- a/net/bridge/br_netfilter.c +++ b/net/bridge/br_netfilter.c | |||
@@ -591,6 +591,9 @@ static unsigned int br_nf_pre_routing(unsigned int hook, struct sk_buff *skb, | |||
591 | 591 | ||
592 | pskb_trim_rcsum(skb, len); | 592 | pskb_trim_rcsum(skb, len); |
593 | 593 | ||
594 | /* BUG: Should really parse the IP options here. */ | ||
595 | memset(IPCB(skb), 0, sizeof(struct inet_skb_parm)); | ||
596 | |||
594 | nf_bridge_put(skb->nf_bridge); | 597 | nf_bridge_put(skb->nf_bridge); |
595 | if (!nf_bridge_alloc(skb)) | 598 | if (!nf_bridge_alloc(skb)) |
596 | return NF_DROP; | 599 | return NF_DROP; |
diff --git a/net/core/dev.c b/net/core/dev.c index 2b3bf53bc687..723a34710ad4 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -1553,6 +1553,24 @@ static void dev_queue_xmit_nit(struct sk_buff *skb, struct net_device *dev) | |||
1553 | rcu_read_unlock(); | 1553 | rcu_read_unlock(); |
1554 | } | 1554 | } |
1555 | 1555 | ||
1556 | /* | ||
1557 | * Routine to help set real_num_tx_queues. To avoid skbs mapped to queues | ||
1558 | * greater then real_num_tx_queues stale skbs on the qdisc must be flushed. | ||
1559 | */ | ||
1560 | void netif_set_real_num_tx_queues(struct net_device *dev, unsigned int txq) | ||
1561 | { | ||
1562 | unsigned int real_num = dev->real_num_tx_queues; | ||
1563 | |||
1564 | if (unlikely(txq > dev->num_tx_queues)) | ||
1565 | ; | ||
1566 | else if (txq > real_num) | ||
1567 | dev->real_num_tx_queues = txq; | ||
1568 | else if (txq < real_num) { | ||
1569 | dev->real_num_tx_queues = txq; | ||
1570 | qdisc_reset_all_tx_gt(dev, txq); | ||
1571 | } | ||
1572 | } | ||
1573 | EXPORT_SYMBOL(netif_set_real_num_tx_queues); | ||
1556 | 1574 | ||
1557 | static inline void __netif_reschedule(struct Qdisc *q) | 1575 | static inline void __netif_reschedule(struct Qdisc *q) |
1558 | { | 1576 | { |
diff --git a/net/core/ethtool.c b/net/core/ethtool.c index a0f4964033d2..75e4ffeb8cc9 100644 --- a/net/core/ethtool.c +++ b/net/core/ethtool.c | |||
@@ -318,23 +318,33 @@ out: | |||
318 | } | 318 | } |
319 | 319 | ||
320 | static noinline_for_stack int ethtool_set_rxnfc(struct net_device *dev, | 320 | static noinline_for_stack int ethtool_set_rxnfc(struct net_device *dev, |
321 | void __user *useraddr) | 321 | u32 cmd, void __user *useraddr) |
322 | { | 322 | { |
323 | struct ethtool_rxnfc cmd; | 323 | struct ethtool_rxnfc info; |
324 | size_t info_size = sizeof(info); | ||
324 | 325 | ||
325 | if (!dev->ethtool_ops->set_rxnfc) | 326 | if (!dev->ethtool_ops->set_rxnfc) |
326 | return -EOPNOTSUPP; | 327 | return -EOPNOTSUPP; |
327 | 328 | ||
328 | if (copy_from_user(&cmd, useraddr, sizeof(cmd))) | 329 | /* struct ethtool_rxnfc was originally defined for |
330 | * ETHTOOL_{G,S}RXFH with only the cmd, flow_type and data | ||
331 | * members. User-space might still be using that | ||
332 | * definition. */ | ||
333 | if (cmd == ETHTOOL_SRXFH) | ||
334 | info_size = (offsetof(struct ethtool_rxnfc, data) + | ||
335 | sizeof(info.data)); | ||
336 | |||
337 | if (copy_from_user(&info, useraddr, info_size)) | ||
329 | return -EFAULT; | 338 | return -EFAULT; |
330 | 339 | ||
331 | return dev->ethtool_ops->set_rxnfc(dev, &cmd); | 340 | return dev->ethtool_ops->set_rxnfc(dev, &info); |
332 | } | 341 | } |
333 | 342 | ||
334 | static noinline_for_stack int ethtool_get_rxnfc(struct net_device *dev, | 343 | static noinline_for_stack int ethtool_get_rxnfc(struct net_device *dev, |
335 | void __user *useraddr) | 344 | u32 cmd, void __user *useraddr) |
336 | { | 345 | { |
337 | struct ethtool_rxnfc info; | 346 | struct ethtool_rxnfc info; |
347 | size_t info_size = sizeof(info); | ||
338 | const struct ethtool_ops *ops = dev->ethtool_ops; | 348 | const struct ethtool_ops *ops = dev->ethtool_ops; |
339 | int ret; | 349 | int ret; |
340 | void *rule_buf = NULL; | 350 | void *rule_buf = NULL; |
@@ -342,13 +352,22 @@ static noinline_for_stack int ethtool_get_rxnfc(struct net_device *dev, | |||
342 | if (!ops->get_rxnfc) | 352 | if (!ops->get_rxnfc) |
343 | return -EOPNOTSUPP; | 353 | return -EOPNOTSUPP; |
344 | 354 | ||
345 | if (copy_from_user(&info, useraddr, sizeof(info))) | 355 | /* struct ethtool_rxnfc was originally defined for |
356 | * ETHTOOL_{G,S}RXFH with only the cmd, flow_type and data | ||
357 | * members. User-space might still be using that | ||
358 | * definition. */ | ||
359 | if (cmd == ETHTOOL_GRXFH) | ||
360 | info_size = (offsetof(struct ethtool_rxnfc, data) + | ||
361 | sizeof(info.data)); | ||
362 | |||
363 | if (copy_from_user(&info, useraddr, info_size)) | ||
346 | return -EFAULT; | 364 | return -EFAULT; |
347 | 365 | ||
348 | if (info.cmd == ETHTOOL_GRXCLSRLALL) { | 366 | if (info.cmd == ETHTOOL_GRXCLSRLALL) { |
349 | if (info.rule_cnt > 0) { | 367 | if (info.rule_cnt > 0) { |
350 | rule_buf = kmalloc(info.rule_cnt * sizeof(u32), | 368 | if (info.rule_cnt <= KMALLOC_MAX_SIZE / sizeof(u32)) |
351 | GFP_USER); | 369 | rule_buf = kmalloc(info.rule_cnt * sizeof(u32), |
370 | GFP_USER); | ||
352 | if (!rule_buf) | 371 | if (!rule_buf) |
353 | return -ENOMEM; | 372 | return -ENOMEM; |
354 | } | 373 | } |
@@ -359,7 +378,7 @@ static noinline_for_stack int ethtool_get_rxnfc(struct net_device *dev, | |||
359 | goto err_out; | 378 | goto err_out; |
360 | 379 | ||
361 | ret = -EFAULT; | 380 | ret = -EFAULT; |
362 | if (copy_to_user(useraddr, &info, sizeof(info))) | 381 | if (copy_to_user(useraddr, &info, info_size)) |
363 | goto err_out; | 382 | goto err_out; |
364 | 383 | ||
365 | if (rule_buf) { | 384 | if (rule_buf) { |
@@ -1516,12 +1535,12 @@ int dev_ethtool(struct net *net, struct ifreq *ifr) | |||
1516 | case ETHTOOL_GRXCLSRLCNT: | 1535 | case ETHTOOL_GRXCLSRLCNT: |
1517 | case ETHTOOL_GRXCLSRULE: | 1536 | case ETHTOOL_GRXCLSRULE: |
1518 | case ETHTOOL_GRXCLSRLALL: | 1537 | case ETHTOOL_GRXCLSRLALL: |
1519 | rc = ethtool_get_rxnfc(dev, useraddr); | 1538 | rc = ethtool_get_rxnfc(dev, ethcmd, useraddr); |
1520 | break; | 1539 | break; |
1521 | case ETHTOOL_SRXFH: | 1540 | case ETHTOOL_SRXFH: |
1522 | case ETHTOOL_SRXCLSRLDEL: | 1541 | case ETHTOOL_SRXCLSRLDEL: |
1523 | case ETHTOOL_SRXCLSRLINS: | 1542 | case ETHTOOL_SRXCLSRLINS: |
1524 | rc = ethtool_set_rxnfc(dev, useraddr); | 1543 | rc = ethtool_set_rxnfc(dev, ethcmd, useraddr); |
1525 | break; | 1544 | break; |
1526 | case ETHTOOL_GGRO: | 1545 | case ETHTOOL_GGRO: |
1527 | rc = ethtool_get_gro(dev, useraddr); | 1546 | rc = ethtool_get_gro(dev, useraddr); |
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 9f07e749d7b1..34432b4e96bb 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c | |||
@@ -532,6 +532,7 @@ static void __copy_skb_header(struct sk_buff *new, const struct sk_buff *old) | |||
532 | new->ip_summed = old->ip_summed; | 532 | new->ip_summed = old->ip_summed; |
533 | skb_copy_queue_mapping(new, old); | 533 | skb_copy_queue_mapping(new, old); |
534 | new->priority = old->priority; | 534 | new->priority = old->priority; |
535 | new->deliver_no_wcard = old->deliver_no_wcard; | ||
535 | #if defined(CONFIG_IP_VS) || defined(CONFIG_IP_VS_MODULE) | 536 | #if defined(CONFIG_IP_VS) || defined(CONFIG_IP_VS_MODULE) |
536 | new->ipvs_property = old->ipvs_property; | 537 | new->ipvs_property = old->ipvs_property; |
537 | #endif | 538 | #endif |
@@ -569,7 +570,6 @@ static struct sk_buff *__skb_clone(struct sk_buff *n, struct sk_buff *skb) | |||
569 | C(len); | 570 | C(len); |
570 | C(data_len); | 571 | C(data_len); |
571 | C(mac_len); | 572 | C(mac_len); |
572 | C(rxhash); | ||
573 | n->hdr_len = skb->nohdr ? skb_headroom(skb) : skb->hdr_len; | 573 | n->hdr_len = skb->nohdr ? skb_headroom(skb) : skb->hdr_len; |
574 | n->cloned = 1; | 574 | n->cloned = 1; |
575 | n->nohdr = 0; | 575 | n->nohdr = 0; |
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index 9a4a6c96cb0d..041d41df1224 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c | |||
@@ -873,8 +873,10 @@ int ip_append_data(struct sock *sk, | |||
873 | !exthdrlen) | 873 | !exthdrlen) |
874 | csummode = CHECKSUM_PARTIAL; | 874 | csummode = CHECKSUM_PARTIAL; |
875 | 875 | ||
876 | skb = skb_peek_tail(&sk->sk_write_queue); | ||
877 | |||
876 | inet->cork.length += length; | 878 | inet->cork.length += length; |
877 | if (((length> mtu) || !skb_queue_empty(&sk->sk_write_queue)) && | 879 | if (((length > mtu) || (skb && skb_is_gso(skb))) && |
878 | (sk->sk_protocol == IPPROTO_UDP) && | 880 | (sk->sk_protocol == IPPROTO_UDP) && |
879 | (rt->u.dst.dev->features & NETIF_F_UFO)) { | 881 | (rt->u.dst.dev->features & NETIF_F_UFO)) { |
880 | err = ip_ufo_append_data(sk, getfrag, from, length, hh_len, | 882 | err = ip_ufo_append_data(sk, getfrag, from, length, hh_len, |
@@ -892,7 +894,7 @@ int ip_append_data(struct sock *sk, | |||
892 | * adding appropriate IP header. | 894 | * adding appropriate IP header. |
893 | */ | 895 | */ |
894 | 896 | ||
895 | if ((skb = skb_peek_tail(&sk->sk_write_queue)) == NULL) | 897 | if (!skb) |
896 | goto alloc_new_skb; | 898 | goto alloc_new_skb; |
897 | 899 | ||
898 | while (length > 0) { | 900 | while (length > 0) { |
@@ -1121,7 +1123,8 @@ ssize_t ip_append_page(struct sock *sk, struct page *page, | |||
1121 | return -EINVAL; | 1123 | return -EINVAL; |
1122 | 1124 | ||
1123 | inet->cork.length += size; | 1125 | inet->cork.length += size; |
1124 | if ((sk->sk_protocol == IPPROTO_UDP) && | 1126 | if ((size + skb->len > mtu) && |
1127 | (sk->sk_protocol == IPPROTO_UDP) && | ||
1125 | (rt->u.dst.dev->features & NETIF_F_UFO)) { | 1128 | (rt->u.dst.dev->features & NETIF_F_UFO)) { |
1126 | skb_shinfo(skb)->gso_size = mtu - fragheaderlen; | 1129 | skb_shinfo(skb)->gso_size = mtu - fragheaderlen; |
1127 | skb_shinfo(skb)->gso_type = SKB_GSO_UDP; | 1130 | skb_shinfo(skb)->gso_type = SKB_GSO_UDP; |
diff --git a/net/ipv4/xfrm4_policy.c b/net/ipv4/xfrm4_policy.c index 1705476670ef..23883a48ebfb 100644 --- a/net/ipv4/xfrm4_policy.c +++ b/net/ipv4/xfrm4_policy.c | |||
@@ -108,6 +108,8 @@ _decode_session4(struct sk_buff *skb, struct flowi *fl, int reverse) | |||
108 | u8 *xprth = skb_network_header(skb) + iph->ihl * 4; | 108 | u8 *xprth = skb_network_header(skb) + iph->ihl * 4; |
109 | 109 | ||
110 | memset(fl, 0, sizeof(struct flowi)); | 110 | memset(fl, 0, sizeof(struct flowi)); |
111 | fl->mark = skb->mark; | ||
112 | |||
111 | if (!(iph->frag_off & htons(IP_MF | IP_OFFSET))) { | 113 | if (!(iph->frag_off & htons(IP_MF | IP_OFFSET))) { |
112 | switch (iph->protocol) { | 114 | switch (iph->protocol) { |
113 | case IPPROTO_UDP: | 115 | case IPPROTO_UDP: |
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index 0abdc242ddb7..2efef52fb461 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c | |||
@@ -586,6 +586,7 @@ static void ndisc_send_na(struct net_device *dev, struct neighbour *neigh, | |||
586 | src_addr = solicited_addr; | 586 | src_addr = solicited_addr; |
587 | if (ifp->flags & IFA_F_OPTIMISTIC) | 587 | if (ifp->flags & IFA_F_OPTIMISTIC) |
588 | override = 0; | 588 | override = 0; |
589 | inc_opt |= ifp->idev->cnf.force_tllao; | ||
589 | in6_ifa_put(ifp); | 590 | in6_ifa_put(ifp); |
590 | } else { | 591 | } else { |
591 | if (ipv6_dev_get_saddr(dev_net(dev), dev, daddr, | 592 | if (ipv6_dev_get_saddr(dev_net(dev), dev, daddr, |
@@ -599,7 +600,6 @@ static void ndisc_send_na(struct net_device *dev, struct neighbour *neigh, | |||
599 | icmp6h.icmp6_solicited = solicited; | 600 | icmp6h.icmp6_solicited = solicited; |
600 | icmp6h.icmp6_override = override; | 601 | icmp6h.icmp6_override = override; |
601 | 602 | ||
602 | inc_opt |= ifp->idev->cnf.force_tllao; | ||
603 | __ndisc_send(dev, neigh, daddr, src_addr, | 603 | __ndisc_send(dev, neigh, daddr, src_addr, |
604 | &icmp6h, solicited_addr, | 604 | &icmp6h, solicited_addr, |
605 | inc_opt ? ND_OPT_TARGET_LL_ADDR : 0); | 605 | inc_opt ? ND_OPT_TARGET_LL_ADDR : 0); |
diff --git a/net/ipv6/netfilter/ip6t_REJECT.c b/net/ipv6/netfilter/ip6t_REJECT.c index 47d227713758..2933396e0281 100644 --- a/net/ipv6/netfilter/ip6t_REJECT.c +++ b/net/ipv6/netfilter/ip6t_REJECT.c | |||
@@ -97,9 +97,11 @@ static void send_reset(struct net *net, struct sk_buff *oldskb) | |||
97 | fl.fl_ip_dport = otcph.source; | 97 | fl.fl_ip_dport = otcph.source; |
98 | security_skb_classify_flow(oldskb, &fl); | 98 | security_skb_classify_flow(oldskb, &fl); |
99 | dst = ip6_route_output(net, NULL, &fl); | 99 | dst = ip6_route_output(net, NULL, &fl); |
100 | if (dst == NULL) | 100 | if (dst == NULL || dst->error) { |
101 | dst_release(dst); | ||
101 | return; | 102 | return; |
102 | if (dst->error || xfrm_lookup(net, &dst, &fl, NULL, 0)) | 103 | } |
104 | if (xfrm_lookup(net, &dst, &fl, NULL, 0)) | ||
103 | return; | 105 | return; |
104 | 106 | ||
105 | hh_len = (dst->dev->hard_header_len + 15)&~15; | 107 | hh_len = (dst->dev->hard_header_len + 15)&~15; |
diff --git a/net/ipv6/xfrm6_policy.c b/net/ipv6/xfrm6_policy.c index 4a0e77e14468..6baeabbbca82 100644 --- a/net/ipv6/xfrm6_policy.c +++ b/net/ipv6/xfrm6_policy.c | |||
@@ -124,6 +124,8 @@ _decode_session6(struct sk_buff *skb, struct flowi *fl, int reverse) | |||
124 | u8 nexthdr = nh[IP6CB(skb)->nhoff]; | 124 | u8 nexthdr = nh[IP6CB(skb)->nhoff]; |
125 | 125 | ||
126 | memset(fl, 0, sizeof(struct flowi)); | 126 | memset(fl, 0, sizeof(struct flowi)); |
127 | fl->mark = skb->mark; | ||
128 | |||
127 | ipv6_addr_copy(&fl->fl6_dst, reverse ? &hdr->saddr : &hdr->daddr); | 129 | ipv6_addr_copy(&fl->fl6_dst, reverse ? &hdr->saddr : &hdr->daddr); |
128 | ipv6_addr_copy(&fl->fl6_src, reverse ? &hdr->daddr : &hdr->saddr); | 130 | ipv6_addr_copy(&fl->fl6_src, reverse ? &hdr->daddr : &hdr->saddr); |
129 | 131 | ||
diff --git a/net/mac80211/work.c b/net/mac80211/work.c index be3d4a698692..b025dc7bb0fd 100644 --- a/net/mac80211/work.c +++ b/net/mac80211/work.c | |||
@@ -715,7 +715,7 @@ static void ieee80211_work_rx_queued_mgmt(struct ieee80211_local *local, | |||
715 | struct ieee80211_rx_status *rx_status; | 715 | struct ieee80211_rx_status *rx_status; |
716 | struct ieee80211_mgmt *mgmt; | 716 | struct ieee80211_mgmt *mgmt; |
717 | struct ieee80211_work *wk; | 717 | struct ieee80211_work *wk; |
718 | enum work_action rma; | 718 | enum work_action rma = WORK_ACT_NONE; |
719 | u16 fc; | 719 | u16 fc; |
720 | 720 | ||
721 | rx_status = (struct ieee80211_rx_status *) skb->cb; | 721 | rx_status = (struct ieee80211_rx_status *) skb->cb; |
diff --git a/net/netfilter/ipvs/ip_vs_conn.c b/net/netfilter/ipvs/ip_vs_conn.c index d8f7e8ef67b4..ff04e9edbed6 100644 --- a/net/netfilter/ipvs/ip_vs_conn.c +++ b/net/netfilter/ipvs/ip_vs_conn.c | |||
@@ -162,6 +162,7 @@ static inline int ip_vs_conn_hash(struct ip_vs_conn *cp) | |||
162 | hash = ip_vs_conn_hashkey(cp->af, cp->protocol, &cp->caddr, cp->cport); | 162 | hash = ip_vs_conn_hashkey(cp->af, cp->protocol, &cp->caddr, cp->cport); |
163 | 163 | ||
164 | ct_write_lock(hash); | 164 | ct_write_lock(hash); |
165 | spin_lock(&cp->lock); | ||
165 | 166 | ||
166 | if (!(cp->flags & IP_VS_CONN_F_HASHED)) { | 167 | if (!(cp->flags & IP_VS_CONN_F_HASHED)) { |
167 | list_add(&cp->c_list, &ip_vs_conn_tab[hash]); | 168 | list_add(&cp->c_list, &ip_vs_conn_tab[hash]); |
@@ -174,6 +175,7 @@ static inline int ip_vs_conn_hash(struct ip_vs_conn *cp) | |||
174 | ret = 0; | 175 | ret = 0; |
175 | } | 176 | } |
176 | 177 | ||
178 | spin_unlock(&cp->lock); | ||
177 | ct_write_unlock(hash); | 179 | ct_write_unlock(hash); |
178 | 180 | ||
179 | return ret; | 181 | return ret; |
@@ -193,6 +195,7 @@ static inline int ip_vs_conn_unhash(struct ip_vs_conn *cp) | |||
193 | hash = ip_vs_conn_hashkey(cp->af, cp->protocol, &cp->caddr, cp->cport); | 195 | hash = ip_vs_conn_hashkey(cp->af, cp->protocol, &cp->caddr, cp->cport); |
194 | 196 | ||
195 | ct_write_lock(hash); | 197 | ct_write_lock(hash); |
198 | spin_lock(&cp->lock); | ||
196 | 199 | ||
197 | if (cp->flags & IP_VS_CONN_F_HASHED) { | 200 | if (cp->flags & IP_VS_CONN_F_HASHED) { |
198 | list_del(&cp->c_list); | 201 | list_del(&cp->c_list); |
@@ -202,6 +205,7 @@ static inline int ip_vs_conn_unhash(struct ip_vs_conn *cp) | |||
202 | } else | 205 | } else |
203 | ret = 0; | 206 | ret = 0; |
204 | 207 | ||
208 | spin_unlock(&cp->lock); | ||
205 | ct_write_unlock(hash); | 209 | ct_write_unlock(hash); |
206 | 210 | ||
207 | return ret; | 211 | return ret; |
diff --git a/net/sched/sch_teql.c b/net/sched/sch_teql.c index 3415b6ce1c0a..807643bdcbac 100644 --- a/net/sched/sch_teql.c +++ b/net/sched/sch_teql.c | |||
@@ -449,6 +449,7 @@ static __init void teql_master_setup(struct net_device *dev) | |||
449 | dev->tx_queue_len = 100; | 449 | dev->tx_queue_len = 100; |
450 | dev->flags = IFF_NOARP; | 450 | dev->flags = IFF_NOARP; |
451 | dev->hard_header_len = LL_MAX_HEADER; | 451 | dev->hard_header_len = LL_MAX_HEADER; |
452 | dev->priv_flags &= ~IFF_XMIT_DST_RELEASE; | ||
452 | } | 453 | } |
453 | 454 | ||
454 | static LIST_HEAD(master_dev_list); | 455 | static LIST_HEAD(master_dev_list); |
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index 2a9675136c68..7ca65c7005ea 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c | |||
@@ -210,7 +210,8 @@ struct sock_xprt { | |||
210 | * State of TCP reply receive | 210 | * State of TCP reply receive |
211 | */ | 211 | */ |
212 | __be32 tcp_fraghdr, | 212 | __be32 tcp_fraghdr, |
213 | tcp_xid; | 213 | tcp_xid, |
214 | tcp_calldir; | ||
214 | 215 | ||
215 | u32 tcp_offset, | 216 | u32 tcp_offset, |
216 | tcp_reclen; | 217 | tcp_reclen; |
@@ -927,7 +928,7 @@ static inline void xs_tcp_read_calldir(struct sock_xprt *transport, | |||
927 | { | 928 | { |
928 | size_t len, used; | 929 | size_t len, used; |
929 | u32 offset; | 930 | u32 offset; |
930 | __be32 calldir; | 931 | char *p; |
931 | 932 | ||
932 | /* | 933 | /* |
933 | * We want transport->tcp_offset to be 8 at the end of this routine | 934 | * We want transport->tcp_offset to be 8 at the end of this routine |
@@ -936,26 +937,33 @@ static inline void xs_tcp_read_calldir(struct sock_xprt *transport, | |||
936 | * transport->tcp_offset is 4 (after having already read the xid). | 937 | * transport->tcp_offset is 4 (after having already read the xid). |
937 | */ | 938 | */ |
938 | offset = transport->tcp_offset - sizeof(transport->tcp_xid); | 939 | offset = transport->tcp_offset - sizeof(transport->tcp_xid); |
939 | len = sizeof(calldir) - offset; | 940 | len = sizeof(transport->tcp_calldir) - offset; |
940 | dprintk("RPC: reading CALL/REPLY flag (%Zu bytes)\n", len); | 941 | dprintk("RPC: reading CALL/REPLY flag (%Zu bytes)\n", len); |
941 | used = xdr_skb_read_bits(desc, &calldir, len); | 942 | p = ((char *) &transport->tcp_calldir) + offset; |
943 | used = xdr_skb_read_bits(desc, p, len); | ||
942 | transport->tcp_offset += used; | 944 | transport->tcp_offset += used; |
943 | if (used != len) | 945 | if (used != len) |
944 | return; | 946 | return; |
945 | transport->tcp_flags &= ~TCP_RCV_READ_CALLDIR; | 947 | transport->tcp_flags &= ~TCP_RCV_READ_CALLDIR; |
946 | transport->tcp_flags |= TCP_RCV_COPY_CALLDIR; | ||
947 | transport->tcp_flags |= TCP_RCV_COPY_DATA; | ||
948 | /* | 948 | /* |
949 | * We don't yet have the XDR buffer, so we will write the calldir | 949 | * We don't yet have the XDR buffer, so we will write the calldir |
950 | * out after we get the buffer from the 'struct rpc_rqst' | 950 | * out after we get the buffer from the 'struct rpc_rqst' |
951 | */ | 951 | */ |
952 | if (ntohl(calldir) == RPC_REPLY) | 952 | switch (ntohl(transport->tcp_calldir)) { |
953 | case RPC_REPLY: | ||
954 | transport->tcp_flags |= TCP_RCV_COPY_CALLDIR; | ||
955 | transport->tcp_flags |= TCP_RCV_COPY_DATA; | ||
953 | transport->tcp_flags |= TCP_RPC_REPLY; | 956 | transport->tcp_flags |= TCP_RPC_REPLY; |
954 | else | 957 | break; |
958 | case RPC_CALL: | ||
959 | transport->tcp_flags |= TCP_RCV_COPY_CALLDIR; | ||
960 | transport->tcp_flags |= TCP_RCV_COPY_DATA; | ||
955 | transport->tcp_flags &= ~TCP_RPC_REPLY; | 961 | transport->tcp_flags &= ~TCP_RPC_REPLY; |
956 | dprintk("RPC: reading %s CALL/REPLY flag %08x\n", | 962 | break; |
957 | (transport->tcp_flags & TCP_RPC_REPLY) ? | 963 | default: |
958 | "reply for" : "request with", calldir); | 964 | dprintk("RPC: invalid request message type\n"); |
965 | xprt_force_disconnect(&transport->xprt); | ||
966 | } | ||
959 | xs_tcp_check_fraghdr(transport); | 967 | xs_tcp_check_fraghdr(transport); |
960 | } | 968 | } |
961 | 969 | ||
@@ -975,12 +983,10 @@ static inline void xs_tcp_read_common(struct rpc_xprt *xprt, | |||
975 | /* | 983 | /* |
976 | * Save the RPC direction in the XDR buffer | 984 | * Save the RPC direction in the XDR buffer |
977 | */ | 985 | */ |
978 | __be32 calldir = transport->tcp_flags & TCP_RPC_REPLY ? | ||
979 | htonl(RPC_REPLY) : 0; | ||
980 | |||
981 | memcpy(rcvbuf->head[0].iov_base + transport->tcp_copied, | 986 | memcpy(rcvbuf->head[0].iov_base + transport->tcp_copied, |
982 | &calldir, sizeof(calldir)); | 987 | &transport->tcp_calldir, |
983 | transport->tcp_copied += sizeof(calldir); | 988 | sizeof(transport->tcp_calldir)); |
989 | transport->tcp_copied += sizeof(transport->tcp_calldir); | ||
984 | transport->tcp_flags &= ~TCP_RCV_COPY_CALLDIR; | 990 | transport->tcp_flags &= ~TCP_RCV_COPY_CALLDIR; |
985 | } | 991 | } |
986 | 992 | ||
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c index 4bf27d901333..af1c173be4ad 100644 --- a/net/xfrm/xfrm_policy.c +++ b/net/xfrm/xfrm_policy.c | |||
@@ -2300,7 +2300,8 @@ int xfrm_bundle_ok(struct xfrm_policy *pol, struct xfrm_dst *first, | |||
2300 | return 0; | 2300 | return 0; |
2301 | if (xdst->xfrm_genid != dst->xfrm->genid) | 2301 | if (xdst->xfrm_genid != dst->xfrm->genid) |
2302 | return 0; | 2302 | return 0; |
2303 | if (xdst->policy_genid != atomic_read(&xdst->pols[0]->genid)) | 2303 | if (xdst->num_pols > 0 && |
2304 | xdst->policy_genid != atomic_read(&xdst->pols[0]->genid)) | ||
2304 | return 0; | 2305 | return 0; |
2305 | 2306 | ||
2306 | if (strict && fl && | 2307 | if (strict && fl && |