diff options
author | David S. Miller <davem@davemloft.net> | 2014-11-29 23:47:48 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-11-29 23:47:48 -0500 |
commit | 60b7379dc5b1743427b031cca53e30860a38ada6 (patch) | |
tree | c0462b8dd188861bd04f36dd31672b7446e35dd8 /net/ipv6 | |
parent | a523a5ecc8c6ddceb8f783f600605553e5ad8963 (diff) | |
parent | 7a5a4f978750756755dc839014e13d1b088ccc8e (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/ip6_gre.c | 4 | ||||
-rw-r--r-- | net/ipv6/ip6_offload.c | 3 | ||||
-rw-r--r-- | net/ipv6/ip6_udp_tunnel.c | 4 | ||||
-rw-r--r-- | net/ipv6/ip6_vti.c | 11 | ||||
-rw-r--r-- | net/ipv6/tcp_ipv6.c | 5 |
5 files changed, 20 insertions, 7 deletions
diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c index f6e2533c1145..13cda4c6313b 100644 --- a/net/ipv6/ip6_gre.c +++ b/net/ipv6/ip6_gre.c | |||
@@ -502,11 +502,11 @@ static int ip6gre_rcv(struct sk_buff *skb) | |||
502 | 502 | ||
503 | skb->protocol = gre_proto; | 503 | skb->protocol = gre_proto; |
504 | /* WCCP version 1 and 2 protocol decoding. | 504 | /* WCCP version 1 and 2 protocol decoding. |
505 | * - Change protocol to IP | 505 | * - Change protocol to IPv6 |
506 | * - When dealing with WCCPv2, Skip extra 4 bytes in GRE header | 506 | * - When dealing with WCCPv2, Skip extra 4 bytes in GRE header |
507 | */ | 507 | */ |
508 | if (flags == 0 && gre_proto == htons(ETH_P_WCCP)) { | 508 | if (flags == 0 && gre_proto == htons(ETH_P_WCCP)) { |
509 | skb->protocol = htons(ETH_P_IP); | 509 | skb->protocol = htons(ETH_P_IPV6); |
510 | if ((*(h + offset) & 0xF0) != 0x40) | 510 | if ((*(h + offset) & 0xF0) != 0x40) |
511 | offset += 4; | 511 | offset += 4; |
512 | } | 512 | } |
diff --git a/net/ipv6/ip6_offload.c b/net/ipv6/ip6_offload.c index fd76ce938c32..46d452a56d3e 100644 --- a/net/ipv6/ip6_offload.c +++ b/net/ipv6/ip6_offload.c | |||
@@ -69,7 +69,8 @@ static struct sk_buff *ipv6_gso_segment(struct sk_buff *skb, | |||
69 | int nhoff; | 69 | int nhoff; |
70 | 70 | ||
71 | if (unlikely(skb_shinfo(skb)->gso_type & | 71 | if (unlikely(skb_shinfo(skb)->gso_type & |
72 | ~(SKB_GSO_UDP | | 72 | ~(SKB_GSO_TCPV4 | |
73 | SKB_GSO_UDP | | ||
73 | SKB_GSO_DODGY | | 74 | SKB_GSO_DODGY | |
74 | SKB_GSO_TCP_ECN | | 75 | SKB_GSO_TCP_ECN | |
75 | SKB_GSO_GRE | | 76 | SKB_GSO_GRE | |
diff --git a/net/ipv6/ip6_udp_tunnel.c b/net/ipv6/ip6_udp_tunnel.c index b04ed72c4542..8db6c98fe218 100644 --- a/net/ipv6/ip6_udp_tunnel.c +++ b/net/ipv6/ip6_udp_tunnel.c | |||
@@ -79,15 +79,13 @@ int udp_tunnel6_xmit_skb(struct socket *sock, struct dst_entry *dst, | |||
79 | uh->source = src_port; | 79 | uh->source = src_port; |
80 | 80 | ||
81 | uh->len = htons(skb->len); | 81 | uh->len = htons(skb->len); |
82 | uh->check = 0; | ||
83 | 82 | ||
84 | memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt)); | 83 | memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt)); |
85 | IPCB(skb)->flags &= ~(IPSKB_XFRM_TUNNEL_SIZE | IPSKB_XFRM_TRANSFORMED | 84 | IPCB(skb)->flags &= ~(IPSKB_XFRM_TUNNEL_SIZE | IPSKB_XFRM_TRANSFORMED |
86 | | IPSKB_REROUTED); | 85 | | IPSKB_REROUTED); |
87 | skb_dst_set(skb, dst); | 86 | skb_dst_set(skb, dst); |
88 | 87 | ||
89 | udp6_set_csum(udp_get_no_check6_tx(sk), skb, &inet6_sk(sk)->saddr, | 88 | udp6_set_csum(udp_get_no_check6_tx(sk), skb, saddr, daddr, skb->len); |
90 | &sk->sk_v6_daddr, skb->len); | ||
91 | 89 | ||
92 | __skb_push(skb, sizeof(*ip6h)); | 90 | __skb_push(skb, sizeof(*ip6h)); |
93 | skb_reset_network_header(skb); | 91 | skb_reset_network_header(skb); |
diff --git a/net/ipv6/ip6_vti.c b/net/ipv6/ip6_vti.c index 83082168b056..16a7e81e3f99 100644 --- a/net/ipv6/ip6_vti.c +++ b/net/ipv6/ip6_vti.c | |||
@@ -911,6 +911,15 @@ static int vti6_newlink(struct net *src_net, struct net_device *dev, | |||
911 | return vti6_tnl_create2(dev); | 911 | return vti6_tnl_create2(dev); |
912 | } | 912 | } |
913 | 913 | ||
914 | static void vti6_dellink(struct net_device *dev, struct list_head *head) | ||
915 | { | ||
916 | struct net *net = dev_net(dev); | ||
917 | struct vti6_net *ip6n = net_generic(net, vti6_net_id); | ||
918 | |||
919 | if (dev != ip6n->fb_tnl_dev) | ||
920 | unregister_netdevice_queue(dev, head); | ||
921 | } | ||
922 | |||
914 | static int vti6_changelink(struct net_device *dev, struct nlattr *tb[], | 923 | static int vti6_changelink(struct net_device *dev, struct nlattr *tb[], |
915 | struct nlattr *data[]) | 924 | struct nlattr *data[]) |
916 | { | 925 | { |
@@ -986,6 +995,7 @@ static struct rtnl_link_ops vti6_link_ops __read_mostly = { | |||
986 | .setup = vti6_dev_setup, | 995 | .setup = vti6_dev_setup, |
987 | .validate = vti6_validate, | 996 | .validate = vti6_validate, |
988 | .newlink = vti6_newlink, | 997 | .newlink = vti6_newlink, |
998 | .dellink = vti6_dellink, | ||
989 | .changelink = vti6_changelink, | 999 | .changelink = vti6_changelink, |
990 | .get_size = vti6_get_size, | 1000 | .get_size = vti6_get_size, |
991 | .fill_info = vti6_fill_info, | 1001 | .fill_info = vti6_fill_info, |
@@ -1026,6 +1036,7 @@ static int __net_init vti6_init_net(struct net *net) | |||
1026 | if (!ip6n->fb_tnl_dev) | 1036 | if (!ip6n->fb_tnl_dev) |
1027 | goto err_alloc_dev; | 1037 | goto err_alloc_dev; |
1028 | dev_net_set(ip6n->fb_tnl_dev, net); | 1038 | dev_net_set(ip6n->fb_tnl_dev, net); |
1039 | ip6n->fb_tnl_dev->rtnl_link_ops = &vti6_link_ops; | ||
1029 | 1040 | ||
1030 | err = vti6_fb_tnl_dev_init(ip6n->fb_tnl_dev); | 1041 | err = vti6_fb_tnl_dev_init(ip6n->fb_tnl_dev); |
1031 | if (err < 0) | 1042 | if (err < 0) |
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index 1985b4933a6b..d06af89162f1 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c | |||
@@ -903,7 +903,10 @@ static void tcp_v6_send_reset(struct sock *sk, struct sk_buff *skb) | |||
903 | if (th->rst) | 903 | if (th->rst) |
904 | return; | 904 | return; |
905 | 905 | ||
906 | if (!ipv6_unicast_destination(skb)) | 906 | /* If sk not NULL, it means we did a successful lookup and incoming |
907 | * route had to be correct. prequeue might have dropped our dst. | ||
908 | */ | ||
909 | if (!sk && !ipv6_unicast_destination(skb)) | ||
907 | return; | 910 | return; |
908 | 911 | ||
909 | #ifdef CONFIG_TCP_MD5SIG | 912 | #ifdef CONFIG_TCP_MD5SIG |