diff options
author | David S. Miller <davem@davemloft.net> | 2015-04-02 16:16:53 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-04-02 16:16:53 -0400 |
commit | 9f0d34bc344889c2e6c593bd949d7ab821f0f4a5 (patch) | |
tree | e5bfc776a09315afa4dbcae97ac04f2cca239c96 /net/ipv6 | |
parent | e4a924f5768c55002c02ceba9b9f86824c35f956 (diff) | |
parent | 0a4812798fae4f6bfcaab51e31b3898ff5ea3108 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
drivers/net/usb/asix_common.c
drivers/net/usb/sr9800.c
drivers/net/usb/usbnet.c
include/linux/usb/usbnet.h
net/ipv4/tcp_ipv4.c
net/ipv6/tcp_ipv6.c
The TCP conflicts were overlapping changes. In 'net' we added a
READ_ONCE() to the socket cached RX route read, whilst in 'net-next'
Eric Dumazet touched the surrounding code dealing with how mini
sockets are handled.
With USB, it's a case of the same bug fix first going into net-next
and then I cherry picked it back into net.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/ip6mr.c | 2 | ||||
-rw-r--r-- | net/ipv6/ndisc.c | 9 | ||||
-rw-r--r-- | net/ipv6/tcp_ipv6.c | 13 |
3 files changed, 21 insertions, 3 deletions
diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c index 003431f5b4b6..26456037bdfc 100644 --- a/net/ipv6/ip6mr.c +++ b/net/ipv6/ip6mr.c | |||
@@ -250,7 +250,7 @@ static int __net_init ip6mr_rules_init(struct net *net) | |||
250 | return 0; | 250 | return 0; |
251 | 251 | ||
252 | err2: | 252 | err2: |
253 | kfree(mrt); | 253 | ip6mr_free_table(mrt); |
254 | err1: | 254 | err1: |
255 | fib_rules_unregister(ops); | 255 | fib_rules_unregister(ops); |
256 | return err; | 256 | return err; |
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index c283827d60e2..71fde6cafb35 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c | |||
@@ -1225,7 +1225,14 @@ static void ndisc_router_discovery(struct sk_buff *skb) | |||
1225 | if (rt) | 1225 | if (rt) |
1226 | rt6_set_expires(rt, jiffies + (HZ * lifetime)); | 1226 | rt6_set_expires(rt, jiffies + (HZ * lifetime)); |
1227 | if (ra_msg->icmph.icmp6_hop_limit) { | 1227 | if (ra_msg->icmph.icmp6_hop_limit) { |
1228 | in6_dev->cnf.hop_limit = ra_msg->icmph.icmp6_hop_limit; | 1228 | /* Only set hop_limit on the interface if it is higher than |
1229 | * the current hop_limit. | ||
1230 | */ | ||
1231 | if (in6_dev->cnf.hop_limit < ra_msg->icmph.icmp6_hop_limit) { | ||
1232 | in6_dev->cnf.hop_limit = ra_msg->icmph.icmp6_hop_limit; | ||
1233 | } else { | ||
1234 | ND_PRINTK(2, warn, "RA: Got route advertisement with lower hop_limit than current\n"); | ||
1235 | } | ||
1229 | if (rt) | 1236 | if (rt) |
1230 | dst_metric_set(&rt->dst, RTAX_HOPLIMIT, | 1237 | dst_metric_set(&rt->dst, RTAX_HOPLIMIT, |
1231 | ra_msg->icmph.icmp6_hop_limit); | 1238 | ra_msg->icmph.icmp6_hop_limit); |
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index 7cdad8401434..f73a97f6e68e 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c | |||
@@ -1348,6 +1348,15 @@ static void tcp_v6_fill_cb(struct sk_buff *skb, const struct ipv6hdr *hdr, | |||
1348 | TCP_SKB_CB(skb)->sacked = 0; | 1348 | TCP_SKB_CB(skb)->sacked = 0; |
1349 | } | 1349 | } |
1350 | 1350 | ||
1351 | static void tcp_v6_restore_cb(struct sk_buff *skb) | ||
1352 | { | ||
1353 | /* We need to move header back to the beginning if xfrm6_policy_check() | ||
1354 | * and tcp_v6_fill_cb() are going to be called again. | ||
1355 | */ | ||
1356 | memmove(IP6CB(skb), &TCP_SKB_CB(skb)->header.h6, | ||
1357 | sizeof(struct inet6_skb_parm)); | ||
1358 | } | ||
1359 | |||
1351 | static int tcp_v6_rcv(struct sk_buff *skb) | 1360 | static int tcp_v6_rcv(struct sk_buff *skb) |
1352 | { | 1361 | { |
1353 | const struct tcphdr *th; | 1362 | const struct tcphdr *th; |
@@ -1480,6 +1489,7 @@ do_time_wait: | |||
1480 | inet_twsk_deschedule(tw, &tcp_death_row); | 1489 | inet_twsk_deschedule(tw, &tcp_death_row); |
1481 | inet_twsk_put(tw); | 1490 | inet_twsk_put(tw); |
1482 | sk = sk2; | 1491 | sk = sk2; |
1492 | tcp_v6_restore_cb(skb); | ||
1483 | goto process; | 1493 | goto process; |
1484 | } | 1494 | } |
1485 | /* Fall through to ACK */ | 1495 | /* Fall through to ACK */ |
@@ -1488,6 +1498,7 @@ do_time_wait: | |||
1488 | tcp_v6_timewait_ack(sk, skb); | 1498 | tcp_v6_timewait_ack(sk, skb); |
1489 | break; | 1499 | break; |
1490 | case TCP_TW_RST: | 1500 | case TCP_TW_RST: |
1501 | tcp_v6_restore_cb(skb); | ||
1491 | goto no_tcp_socket; | 1502 | goto no_tcp_socket; |
1492 | case TCP_TW_SUCCESS: | 1503 | case TCP_TW_SUCCESS: |
1493 | ; | 1504 | ; |
@@ -1522,7 +1533,7 @@ static void tcp_v6_early_demux(struct sk_buff *skb) | |||
1522 | skb->sk = sk; | 1533 | skb->sk = sk; |
1523 | skb->destructor = sock_edemux; | 1534 | skb->destructor = sock_edemux; |
1524 | if (sk_fullsock(sk)) { | 1535 | if (sk_fullsock(sk)) { |
1525 | struct dst_entry *dst = sk->sk_rx_dst; | 1536 | struct dst_entry *dst = READ_ONCE(sk->sk_rx_dst); |
1526 | 1537 | ||
1527 | if (dst) | 1538 | if (dst) |
1528 | dst = dst_check(dst, inet6_sk(sk)->rx_dst_cookie); | 1539 | dst = dst_check(dst, inet6_sk(sk)->rx_dst_cookie); |