diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-12 17:27:40 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-12 17:27:40 -0400 |
commit | f9da455b93f6ba076935b4ef4589f61e529ae046 (patch) | |
tree | 3c4e69ce1ba1d6bf65915b97a76ca2172105b278 /net/ipv6/ip6_output.c | |
parent | 0e04c641b199435f3779454055f6a7de258ecdfc (diff) | |
parent | e5eca6d41f53db48edd8cf88a3f59d2c30227f8e (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Pull networking updates from David Miller:
1) Seccomp BPF filters can now be JIT'd, from Alexei Starovoitov.
2) Multiqueue support in xen-netback and xen-netfront, from Andrew J
Benniston.
3) Allow tweaking of aggregation settings in cdc_ncm driver, from Bjørn
Mork.
4) BPF now has a "random" opcode, from Chema Gonzalez.
5) Add more BPF documentation and improve test framework, from Daniel
Borkmann.
6) Support TCP fastopen over ipv6, from Daniel Lee.
7) Add software TSO helper functions and use them to support software
TSO in mvneta and mv643xx_eth drivers. From Ezequiel Garcia.
8) Support software TSO in fec driver too, from Nimrod Andy.
9) Add Broadcom SYSTEMPORT driver, from Florian Fainelli.
10) Handle broadcasts more gracefully over macvlan when there are large
numbers of interfaces configured, from Herbert Xu.
11) Allow more control over fwmark used for non-socket based responses,
from Lorenzo Colitti.
12) Do TCP congestion window limiting based upon measurements, from Neal
Cardwell.
13) Support busy polling in SCTP, from Neal Horman.
14) Allow RSS key to be configured via ethtool, from Venkata Duvvuru.
15) Bridge promisc mode handling improvements from Vlad Yasevich.
16) Don't use inetpeer entries to implement ID generation any more, it
performs poorly, from Eric Dumazet.
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1522 commits)
rtnetlink: fix userspace API breakage for iproute2 < v3.9.0
tcp: fixing TLP's FIN recovery
net: fec: Add software TSO support
net: fec: Add Scatter/gather support
net: fec: Increase buffer descriptor entry number
net: fec: Factorize feature setting
net: fec: Enable IP header hardware checksum
net: fec: Factorize the .xmit transmit function
bridge: fix compile error when compiling without IPv6 support
bridge: fix smatch warning / potential null pointer dereference
via-rhine: fix full-duplex with autoneg disable
bnx2x: Enlarge the dorq threshold for VFs
bnx2x: Check for UNDI in uncommon branch
bnx2x: Fix 1G-baseT link
bnx2x: Fix link for KR with swapped polarity lane
sctp: Fix sk_ack_backlog wrap-around problem
net/core: Add VF link state control policy
net/fsl: xgmac_mdio is dependent on OF_MDIO
net/fsl: Make xgmac_mdio read error message useful
net_sched: drr: warn when qdisc is not work conserving
...
Diffstat (limited to 'net/ipv6/ip6_output.c')
-rw-r--r-- | net/ipv6/ip6_output.c | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index fbf11562b54c..cb9df0eb4023 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c | |||
@@ -219,7 +219,7 @@ int ip6_xmit(struct sock *sk, struct sk_buff *skb, struct flowi6 *fl6, | |||
219 | skb->mark = sk->sk_mark; | 219 | skb->mark = sk->sk_mark; |
220 | 220 | ||
221 | mtu = dst_mtu(dst); | 221 | mtu = dst_mtu(dst); |
222 | if ((skb->len <= mtu) || skb->local_df || skb_is_gso(skb)) { | 222 | if ((skb->len <= mtu) || skb->ignore_df || skb_is_gso(skb)) { |
223 | IP6_UPD_PO_STATS(net, ip6_dst_idev(skb_dst(skb)), | 223 | IP6_UPD_PO_STATS(net, ip6_dst_idev(skb_dst(skb)), |
224 | IPSTATS_MIB_OUT, skb->len); | 224 | IPSTATS_MIB_OUT, skb->len); |
225 | return NF_HOOK(NFPROTO_IPV6, NF_INET_LOCAL_OUT, skb, NULL, | 225 | return NF_HOOK(NFPROTO_IPV6, NF_INET_LOCAL_OUT, skb, NULL, |
@@ -347,11 +347,11 @@ static bool ip6_pkt_too_big(const struct sk_buff *skb, unsigned int mtu) | |||
347 | if (skb->len <= mtu) | 347 | if (skb->len <= mtu) |
348 | return false; | 348 | return false; |
349 | 349 | ||
350 | /* ipv6 conntrack defrag sets max_frag_size + local_df */ | 350 | /* ipv6 conntrack defrag sets max_frag_size + ignore_df */ |
351 | if (IP6CB(skb)->frag_max_size && IP6CB(skb)->frag_max_size > mtu) | 351 | if (IP6CB(skb)->frag_max_size && IP6CB(skb)->frag_max_size > mtu) |
352 | return true; | 352 | return true; |
353 | 353 | ||
354 | if (skb->local_df) | 354 | if (skb->ignore_df) |
355 | return false; | 355 | return false; |
356 | 356 | ||
357 | if (skb_is_gso(skb) && skb_gso_network_seglen(skb) <= mtu) | 357 | if (skb_is_gso(skb) && skb_gso_network_seglen(skb) <= mtu) |
@@ -537,6 +537,18 @@ static void ip6_copy_metadata(struct sk_buff *to, struct sk_buff *from) | |||
537 | skb_copy_secmark(to, from); | 537 | skb_copy_secmark(to, from); |
538 | } | 538 | } |
539 | 539 | ||
540 | static void ipv6_select_ident(struct frag_hdr *fhdr, struct rt6_info *rt) | ||
541 | { | ||
542 | static u32 ip6_idents_hashrnd __read_mostly; | ||
543 | u32 hash, id; | ||
544 | |||
545 | net_get_random_once(&ip6_idents_hashrnd, sizeof(ip6_idents_hashrnd)); | ||
546 | |||
547 | hash = __ipv6_addr_jhash(&rt->rt6i_dst.addr, ip6_idents_hashrnd); | ||
548 | id = ip_idents_reserve(hash, 1); | ||
549 | fhdr->identification = htonl(id); | ||
550 | } | ||
551 | |||
540 | int ip6_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *)) | 552 | int ip6_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *)) |
541 | { | 553 | { |
542 | struct sk_buff *frag; | 554 | struct sk_buff *frag; |
@@ -559,7 +571,7 @@ int ip6_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *)) | |||
559 | /* We must not fragment if the socket is set to force MTU discovery | 571 | /* We must not fragment if the socket is set to force MTU discovery |
560 | * or if the skb it not generated by a local socket. | 572 | * or if the skb it not generated by a local socket. |
561 | */ | 573 | */ |
562 | if (unlikely(!skb->local_df && skb->len > mtu) || | 574 | if (unlikely(!skb->ignore_df && skb->len > mtu) || |
563 | (IP6CB(skb)->frag_max_size && | 575 | (IP6CB(skb)->frag_max_size && |
564 | IP6CB(skb)->frag_max_size > mtu)) { | 576 | IP6CB(skb)->frag_max_size > mtu)) { |
565 | if (skb->sk && dst_allfrag(skb_dst(skb))) | 577 | if (skb->sk && dst_allfrag(skb_dst(skb))) |
@@ -1234,7 +1246,7 @@ int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to, | |||
1234 | sizeof(struct frag_hdr) : 0) + | 1246 | sizeof(struct frag_hdr) : 0) + |
1235 | rt->rt6i_nfheader_len; | 1247 | rt->rt6i_nfheader_len; |
1236 | 1248 | ||
1237 | if (ip6_sk_local_df(sk)) | 1249 | if (ip6_sk_ignore_df(sk)) |
1238 | maxnonfragsize = sizeof(struct ipv6hdr) + IPV6_MAXPLEN; | 1250 | maxnonfragsize = sizeof(struct ipv6hdr) + IPV6_MAXPLEN; |
1239 | else | 1251 | else |
1240 | maxnonfragsize = mtu; | 1252 | maxnonfragsize = mtu; |
@@ -1544,7 +1556,7 @@ int ip6_push_pending_frames(struct sock *sk) | |||
1544 | } | 1556 | } |
1545 | 1557 | ||
1546 | /* Allow local fragmentation. */ | 1558 | /* Allow local fragmentation. */ |
1547 | skb->local_df = ip6_sk_local_df(sk); | 1559 | skb->ignore_df = ip6_sk_ignore_df(sk); |
1548 | 1560 | ||
1549 | *final_dst = fl6->daddr; | 1561 | *final_dst = fl6->daddr; |
1550 | __skb_pull(skb, skb_network_header_len(skb)); | 1562 | __skb_pull(skb, skb_network_header_len(skb)); |