summaryrefslogtreecommitdiffstats
path: root/net/ipv4/udp.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-02-08 08:20:32 -0500
committerTakashi Iwai <tiwai@suse.de>2019-02-08 08:20:32 -0500
commitd02cac152c97dffcb0cdd91e09b54fd6e2cca63d (patch)
tree68e4c6bd842703009f3edbf8f0e0e9326e4b2fad /net/ipv4/udp.c
parent36e4617c01153757cde9e5fcd375a75a8f8425c3 (diff)
parenta50e32694fbcdbf55875095258b9398e2eabd71f (diff)
Merge tag 'asoc-v5.1' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next
ASoC: Updates for v5.1 Lots and lots of new drivers so far, a highlight being the MediaTek BTCVSD which is a driver for a Bluetooth radio chip - the first such driver we've had upstream. Hopefully we will soon also see a baseband with an upstream driver! - Support for only powering up channels that are actively being used. - Quite a few improvements to simplify the generic card drivers, especially the merge of the SCU cards into the main generic drivers. - Lots of fixes for probing on Intel systems, trying to rationalize things to look more standard from a framework point of view. - New drivers for Asahi Kasei Microdevices AK4497, Cirrus Logic CS4341, Google ChromeOS embedded controllers, Ingenic JZ4725B, MediaTek BTCVSD, MT8183 and MT6358, NXP MICFIL, Rockchip RK3328, Spreadtrum DMA controllers, Qualcomm WCD9335, Xilinx S/PDIF and PCM formatters.
Diffstat (limited to 'net/ipv4/udp.c')
-rw-r--r--net/ipv4/udp.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 3fb0ed5e4789..5c3cd5d84a6f 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -847,15 +847,23 @@ static int udp_send_skb(struct sk_buff *skb, struct flowi4 *fl4,
847 const int hlen = skb_network_header_len(skb) + 847 const int hlen = skb_network_header_len(skb) +
848 sizeof(struct udphdr); 848 sizeof(struct udphdr);
849 849
850 if (hlen + cork->gso_size > cork->fragsize) 850 if (hlen + cork->gso_size > cork->fragsize) {
851 kfree_skb(skb);
851 return -EINVAL; 852 return -EINVAL;
852 if (skb->len > cork->gso_size * UDP_MAX_SEGMENTS) 853 }
854 if (skb->len > cork->gso_size * UDP_MAX_SEGMENTS) {
855 kfree_skb(skb);
853 return -EINVAL; 856 return -EINVAL;
854 if (sk->sk_no_check_tx) 857 }
858 if (sk->sk_no_check_tx) {
859 kfree_skb(skb);
855 return -EINVAL; 860 return -EINVAL;
861 }
856 if (skb->ip_summed != CHECKSUM_PARTIAL || is_udplite || 862 if (skb->ip_summed != CHECKSUM_PARTIAL || is_udplite ||
857 dst_xfrm(skb_dst(skb))) 863 dst_xfrm(skb_dst(skb))) {
864 kfree_skb(skb);
858 return -EIO; 865 return -EIO;
866 }
859 867
860 skb_shinfo(skb)->gso_size = cork->gso_size; 868 skb_shinfo(skb)->gso_size = cork->gso_size;
861 skb_shinfo(skb)->gso_type = SKB_GSO_UDP_L4; 869 skb_shinfo(skb)->gso_type = SKB_GSO_UDP_L4;
@@ -1918,7 +1926,7 @@ void udp_lib_rehash(struct sock *sk, u16 newhash)
1918} 1926}
1919EXPORT_SYMBOL(udp_lib_rehash); 1927EXPORT_SYMBOL(udp_lib_rehash);
1920 1928
1921static void udp_v4_rehash(struct sock *sk) 1929void udp_v4_rehash(struct sock *sk)
1922{ 1930{
1923 u16 new_hash = ipv4_portaddr_hash(sock_net(sk), 1931 u16 new_hash = ipv4_portaddr_hash(sock_net(sk),
1924 inet_sk(sk)->inet_rcv_saddr, 1932 inet_sk(sk)->inet_rcv_saddr,