aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2014-12-10 15:48:20 -0500
committerDavid S. Miller <davem@davemloft.net>2014-12-10 15:48:20 -0500
commit22f10923dd39141785273e423b9acf347297e15f (patch)
treecc1f19103817433a426b3e329d6326f5e9d8e8f7 /net
parent785c20a08bead1e58ad53f2dc324782da7a0c9ea (diff)
parent69204cf7eb9c5a72067ce6922d4699378251d053 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts: drivers/net/ethernet/amd/xgbe/xgbe-desc.c drivers/net/ethernet/renesas/sh_eth.c Overlapping changes in both conflict cases. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/core/rtnetlink.c1
-rw-r--r--net/ipv4/gre_offload.c3
-rw-r--r--net/ipv4/tcp_ipv4.c4
-rw-r--r--net/ipv6/tcp_ipv6.c28
-rw-r--r--net/openvswitch/flow_netlink.c4
-rw-r--r--net/sched/Kconfig7
-rw-r--r--net/sched/sch_fq_codel.c2
-rw-r--r--net/sctp/output.c4
8 files changed, 29 insertions, 24 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index eaa057f14bcd..1ad61a27ee58 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -1523,6 +1523,7 @@ static int do_setlink(const struct sk_buff *skb,
1523 goto errout; 1523 goto errout;
1524 } 1524 }
1525 if (!netlink_ns_capable(skb, net->user_ns, CAP_NET_ADMIN)) { 1525 if (!netlink_ns_capable(skb, net->user_ns, CAP_NET_ADMIN)) {
1526 put_net(net);
1526 err = -EPERM; 1527 err = -EPERM;
1527 goto errout; 1528 goto errout;
1528 } 1529 }
diff --git a/net/ipv4/gre_offload.c b/net/ipv4/gre_offload.c
index bb5947b0ce2d..51973ddc05a6 100644
--- a/net/ipv4/gre_offload.c
+++ b/net/ipv4/gre_offload.c
@@ -247,6 +247,9 @@ static int gre_gro_complete(struct sk_buff *skb, int nhoff)
247 err = ptype->callbacks.gro_complete(skb, nhoff + grehlen); 247 err = ptype->callbacks.gro_complete(skb, nhoff + grehlen);
248 248
249 rcu_read_unlock(); 249 rcu_read_unlock();
250
251 skb_set_inner_mac_header(skb, nhoff + grehlen);
252
250 return err; 253 return err;
251} 254}
252 255
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index 33f5ff068c79..a3f72d7fc06c 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -623,6 +623,7 @@ static void tcp_v4_send_reset(struct sock *sk, struct sk_buff *skb)
623 arg.iov[0].iov_base = (unsigned char *)&rep; 623 arg.iov[0].iov_base = (unsigned char *)&rep;
624 arg.iov[0].iov_len = sizeof(rep.th); 624 arg.iov[0].iov_len = sizeof(rep.th);
625 625
626 net = sk ? sock_net(sk) : dev_net(skb_dst(skb)->dev);
626#ifdef CONFIG_TCP_MD5SIG 627#ifdef CONFIG_TCP_MD5SIG
627 hash_location = tcp_parse_md5sig_option(th); 628 hash_location = tcp_parse_md5sig_option(th);
628 if (!sk && hash_location) { 629 if (!sk && hash_location) {
@@ -633,7 +634,7 @@ static void tcp_v4_send_reset(struct sock *sk, struct sk_buff *skb)
633 * Incoming packet is checked with md5 hash with finding key, 634 * Incoming packet is checked with md5 hash with finding key,
634 * no RST generated if md5 hash doesn't match. 635 * no RST generated if md5 hash doesn't match.
635 */ 636 */
636 sk1 = __inet_lookup_listener(dev_net(skb_dst(skb)->dev), 637 sk1 = __inet_lookup_listener(net,
637 &tcp_hashinfo, ip_hdr(skb)->saddr, 638 &tcp_hashinfo, ip_hdr(skb)->saddr,
638 th->source, ip_hdr(skb)->daddr, 639 th->source, ip_hdr(skb)->daddr,
639 ntohs(th->source), inet_iif(skb)); 640 ntohs(th->source), inet_iif(skb));
@@ -681,7 +682,6 @@ static void tcp_v4_send_reset(struct sock *sk, struct sk_buff *skb)
681 if (sk) 682 if (sk)
682 arg.bound_dev_if = sk->sk_bound_dev_if; 683 arg.bound_dev_if = sk->sk_bound_dev_if;
683 684
684 net = dev_net(skb_dst(skb)->dev);
685 arg.tos = ip_hdr(skb)->tos; 685 arg.tos = ip_hdr(skb)->tos;
686 ip_send_unicast_reply(net, skb, &TCP_SKB_CB(skb)->header.h4.opt, 686 ip_send_unicast_reply(net, skb, &TCP_SKB_CB(skb)->header.h4.opt,
687 ip_hdr(skb)->saddr, ip_hdr(skb)->daddr, 687 ip_hdr(skb)->saddr, ip_hdr(skb)->daddr,
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index d06af89162f1..5ff87805258e 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -787,16 +787,16 @@ static const struct tcp_request_sock_ops tcp_request_sock_ipv6_ops = {
787 .queue_hash_add = inet6_csk_reqsk_queue_hash_add, 787 .queue_hash_add = inet6_csk_reqsk_queue_hash_add,
788}; 788};
789 789
790static void tcp_v6_send_response(struct sk_buff *skb, u32 seq, u32 ack, u32 win, 790static void tcp_v6_send_response(struct sock *sk, struct sk_buff *skb, u32 seq,
791 u32 tsval, u32 tsecr, int oif, 791 u32 ack, u32 win, u32 tsval, u32 tsecr,
792 struct tcp_md5sig_key *key, int rst, u8 tclass, 792 int oif, struct tcp_md5sig_key *key, int rst,
793 u32 label) 793 u8 tclass, u32 label)
794{ 794{
795 const struct tcphdr *th = tcp_hdr(skb); 795 const struct tcphdr *th = tcp_hdr(skb);
796 struct tcphdr *t1; 796 struct tcphdr *t1;
797 struct sk_buff *buff; 797 struct sk_buff *buff;
798 struct flowi6 fl6; 798 struct flowi6 fl6;
799 struct net *net = dev_net(skb_dst(skb)->dev); 799 struct net *net = sk ? sock_net(sk) : dev_net(skb_dst(skb)->dev);
800 struct sock *ctl_sk = net->ipv6.tcp_sk; 800 struct sock *ctl_sk = net->ipv6.tcp_sk;
801 unsigned int tot_len = sizeof(struct tcphdr); 801 unsigned int tot_len = sizeof(struct tcphdr);
802 struct dst_entry *dst; 802 struct dst_entry *dst;
@@ -946,7 +946,7 @@ static void tcp_v6_send_reset(struct sock *sk, struct sk_buff *skb)
946 (th->doff << 2); 946 (th->doff << 2);
947 947
948 oif = sk ? sk->sk_bound_dev_if : 0; 948 oif = sk ? sk->sk_bound_dev_if : 0;
949 tcp_v6_send_response(skb, seq, ack_seq, 0, 0, 0, oif, key, 1, 0, 0); 949 tcp_v6_send_response(sk, skb, seq, ack_seq, 0, 0, 0, oif, key, 1, 0, 0);
950 950
951#ifdef CONFIG_TCP_MD5SIG 951#ifdef CONFIG_TCP_MD5SIG
952release_sk1: 952release_sk1:
@@ -957,13 +957,13 @@ release_sk1:
957#endif 957#endif
958} 958}
959 959
960static void tcp_v6_send_ack(struct sk_buff *skb, u32 seq, u32 ack, 960static void tcp_v6_send_ack(struct sock *sk, struct sk_buff *skb, u32 seq,
961 u32 win, u32 tsval, u32 tsecr, int oif, 961 u32 ack, u32 win, u32 tsval, u32 tsecr, int oif,
962 struct tcp_md5sig_key *key, u8 tclass, 962 struct tcp_md5sig_key *key, u8 tclass,
963 u32 label) 963 u32 label)
964{ 964{
965 tcp_v6_send_response(skb, seq, ack, win, tsval, tsecr, oif, key, 0, tclass, 965 tcp_v6_send_response(sk, skb, seq, ack, win, tsval, tsecr, oif, key, 0,
966 label); 966 tclass, label);
967} 967}
968 968
969static void tcp_v6_timewait_ack(struct sock *sk, struct sk_buff *skb) 969static void tcp_v6_timewait_ack(struct sock *sk, struct sk_buff *skb)
@@ -971,7 +971,7 @@ static void tcp_v6_timewait_ack(struct sock *sk, struct sk_buff *skb)
971 struct inet_timewait_sock *tw = inet_twsk(sk); 971 struct inet_timewait_sock *tw = inet_twsk(sk);
972 struct tcp_timewait_sock *tcptw = tcp_twsk(sk); 972 struct tcp_timewait_sock *tcptw = tcp_twsk(sk);
973 973
974 tcp_v6_send_ack(skb, tcptw->tw_snd_nxt, tcptw->tw_rcv_nxt, 974 tcp_v6_send_ack(sk, skb, tcptw->tw_snd_nxt, tcptw->tw_rcv_nxt,
975 tcptw->tw_rcv_wnd >> tw->tw_rcv_wscale, 975 tcptw->tw_rcv_wnd >> tw->tw_rcv_wscale,
976 tcp_time_stamp + tcptw->tw_ts_offset, 976 tcp_time_stamp + tcptw->tw_ts_offset,
977 tcptw->tw_ts_recent, tw->tw_bound_dev_if, tcp_twsk_md5_key(tcptw), 977 tcptw->tw_ts_recent, tw->tw_bound_dev_if, tcp_twsk_md5_key(tcptw),
@@ -986,10 +986,10 @@ static void tcp_v6_reqsk_send_ack(struct sock *sk, struct sk_buff *skb,
986 /* sk->sk_state == TCP_LISTEN -> for regular TCP_SYN_RECV 986 /* sk->sk_state == TCP_LISTEN -> for regular TCP_SYN_RECV
987 * sk->sk_state == TCP_SYN_RECV -> for Fast Open. 987 * sk->sk_state == TCP_SYN_RECV -> for Fast Open.
988 */ 988 */
989 tcp_v6_send_ack(skb, (sk->sk_state == TCP_LISTEN) ? 989 tcp_v6_send_ack(sk, skb, (sk->sk_state == TCP_LISTEN) ?
990 tcp_rsk(req)->snt_isn + 1 : tcp_sk(sk)->snd_nxt, 990 tcp_rsk(req)->snt_isn + 1 : tcp_sk(sk)->snd_nxt,
991 tcp_rsk(req)->rcv_nxt, 991 tcp_rsk(req)->rcv_nxt, req->rcv_wnd,
992 req->rcv_wnd, tcp_time_stamp, req->ts_recent, sk->sk_bound_dev_if, 992 tcp_time_stamp, req->ts_recent, sk->sk_bound_dev_if,
993 tcp_v6_md5_do_lookup(sk, &ipv6_hdr(skb)->daddr), 993 tcp_v6_md5_do_lookup(sk, &ipv6_hdr(skb)->daddr),
994 0, 0); 994 0, 0);
995} 995}
diff --git a/net/openvswitch/flow_netlink.c b/net/openvswitch/flow_netlink.c
index df3c7f20fcee..9645a21d9eaa 100644
--- a/net/openvswitch/flow_netlink.c
+++ b/net/openvswitch/flow_netlink.c
@@ -140,7 +140,7 @@ static bool match_validate(const struct sw_flow_match *match,
140 if (match->key->eth.type == htons(ETH_P_ARP) 140 if (match->key->eth.type == htons(ETH_P_ARP)
141 || match->key->eth.type == htons(ETH_P_RARP)) { 141 || match->key->eth.type == htons(ETH_P_RARP)) {
142 key_expected |= 1 << OVS_KEY_ATTR_ARP; 142 key_expected |= 1 << OVS_KEY_ATTR_ARP;
143 if (match->mask && (match->mask->key.tp.src == htons(0xff))) 143 if (match->mask && (match->mask->key.eth.type == htons(0xffff)))
144 mask_allowed |= 1 << OVS_KEY_ATTR_ARP; 144 mask_allowed |= 1 << OVS_KEY_ATTR_ARP;
145 } 145 }
146 146
@@ -221,7 +221,7 @@ static bool match_validate(const struct sw_flow_match *match,
221 htons(NDISC_NEIGHBOUR_SOLICITATION) || 221 htons(NDISC_NEIGHBOUR_SOLICITATION) ||
222 match->key->tp.src == htons(NDISC_NEIGHBOUR_ADVERTISEMENT)) { 222 match->key->tp.src == htons(NDISC_NEIGHBOUR_ADVERTISEMENT)) {
223 key_expected |= 1 << OVS_KEY_ATTR_ND; 223 key_expected |= 1 << OVS_KEY_ATTR_ND;
224 if (match->mask && (match->mask->key.tp.src == htons(0xffff))) 224 if (match->mask && (match->mask->key.tp.src == htons(0xff)))
225 mask_allowed |= 1 << OVS_KEY_ATTR_ND; 225 mask_allowed |= 1 << OVS_KEY_ATTR_ND;
226 } 226 }
227 } 227 }
diff --git a/net/sched/Kconfig b/net/sched/Kconfig
index 88618f8b794c..c54c9d9d1ffb 100644
--- a/net/sched/Kconfig
+++ b/net/sched/Kconfig
@@ -22,8 +22,9 @@ menuconfig NET_SCHED
22 This code is considered to be experimental. 22 This code is considered to be experimental.
23 23
24 To administer these schedulers, you'll need the user-level utilities 24 To administer these schedulers, you'll need the user-level utilities
25 from the package iproute2+tc at <ftp://ftp.tux.org/pub/net/ip-routing/>. 25 from the package iproute2+tc at
26 That package also contains some documentation; for more, check out 26 <https://www.kernel.org/pub/linux/utils/net/iproute2/>. That package
27 also contains some documentation; for more, check out
27 <http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2>. 28 <http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2>.
28 29
29 This Quality of Service (QoS) support will enable you to use 30 This Quality of Service (QoS) support will enable you to use
@@ -336,7 +337,7 @@ config NET_SCH_PLUG
336 of virtual machines by allowing the generated network output to be rolled 337 of virtual machines by allowing the generated network output to be rolled
337 back if needed. 338 back if needed.
338 339
339 For more information, please refer to http://wiki.xensource.com/xenwiki/Remus 340 For more information, please refer to <http://wiki.xenproject.org/wiki/Remus>
340 341
341 Say Y here if you are using this kernel for Xen dom0 and 342 Say Y here if you are using this kernel for Xen dom0 and
342 want to protect Xen guests with Remus. 343 want to protect Xen guests with Remus.
diff --git a/net/sched/sch_fq_codel.c b/net/sched/sch_fq_codel.c
index b9ca32ebc1de..1e52decb7b59 100644
--- a/net/sched/sch_fq_codel.c
+++ b/net/sched/sch_fq_codel.c
@@ -94,7 +94,7 @@ static unsigned int fq_codel_classify(struct sk_buff *skb, struct Qdisc *sch,
94 TC_H_MIN(skb->priority) <= q->flows_cnt) 94 TC_H_MIN(skb->priority) <= q->flows_cnt)
95 return TC_H_MIN(skb->priority); 95 return TC_H_MIN(skb->priority);
96 96
97 filter = rcu_dereference(q->filter_list); 97 filter = rcu_dereference_bh(q->filter_list);
98 if (!filter) 98 if (!filter)
99 return fq_codel_hash(q, skb) + 1; 99 return fq_codel_hash(q, skb) + 1;
100 100
diff --git a/net/sctp/output.c b/net/sctp/output.c
index 42dffd428389..fc5e45b8a832 100644
--- a/net/sctp/output.c
+++ b/net/sctp/output.c
@@ -401,12 +401,12 @@ int sctp_packet_transmit(struct sctp_packet *packet)
401 sk = chunk->skb->sk; 401 sk = chunk->skb->sk;
402 402
403 /* Allocate the new skb. */ 403 /* Allocate the new skb. */
404 nskb = alloc_skb(packet->size + LL_MAX_HEADER, GFP_ATOMIC); 404 nskb = alloc_skb(packet->size + MAX_HEADER, GFP_ATOMIC);
405 if (!nskb) 405 if (!nskb)
406 goto nomem; 406 goto nomem;
407 407
408 /* Make sure the outbound skb has enough header room reserved. */ 408 /* Make sure the outbound skb has enough header room reserved. */
409 skb_reserve(nskb, packet->overhead + LL_MAX_HEADER); 409 skb_reserve(nskb, packet->overhead + MAX_HEADER);
410 410
411 /* Set the owning socket so that we know where to get the 411 /* Set the owning socket so that we know where to get the
412 * destination IP address. 412 * destination IP address.