summaryrefslogtreecommitdiffstats
path: root/net/ipv4/fou.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/fou.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/fou.c')
-rw-r--r--net/ipv4/fou.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/net/ipv4/fou.c b/net/ipv4/fou.c
index 0c9f171fb085..437070d1ffb1 100644
--- a/net/ipv4/fou.c
+++ b/net/ipv4/fou.c
@@ -1020,10 +1020,11 @@ static int gue_err(struct sk_buff *skb, u32 info)
1020{ 1020{
1021 int transport_offset = skb_transport_offset(skb); 1021 int transport_offset = skb_transport_offset(skb);
1022 struct guehdr *guehdr; 1022 struct guehdr *guehdr;
1023 size_t optlen; 1023 size_t len, optlen;
1024 int ret; 1024 int ret;
1025 1025
1026 if (skb->len < sizeof(struct udphdr) + sizeof(struct guehdr)) 1026 len = sizeof(struct udphdr) + sizeof(struct guehdr);
1027 if (!pskb_may_pull(skb, len))
1027 return -EINVAL; 1028 return -EINVAL;
1028 1029
1029 guehdr = (struct guehdr *)&udp_hdr(skb)[1]; 1030 guehdr = (struct guehdr *)&udp_hdr(skb)[1];
@@ -1058,6 +1059,10 @@ static int gue_err(struct sk_buff *skb, u32 info)
1058 1059
1059 optlen = guehdr->hlen << 2; 1060 optlen = guehdr->hlen << 2;
1060 1061
1062 if (!pskb_may_pull(skb, len + optlen))
1063 return -EINVAL;
1064
1065 guehdr = (struct guehdr *)&udp_hdr(skb)[1];
1061 if (validate_gue_flags(guehdr, optlen)) 1066 if (validate_gue_flags(guehdr, optlen))
1062 return -EINVAL; 1067 return -EINVAL;
1063 1068
@@ -1065,7 +1070,8 @@ static int gue_err(struct sk_buff *skb, u32 info)
1065 * recursion. Besides, this kind of encapsulation can't even be 1070 * recursion. Besides, this kind of encapsulation can't even be
1066 * configured currently. Discard this. 1071 * configured currently. Discard this.
1067 */ 1072 */
1068 if (guehdr->proto_ctype == IPPROTO_UDP) 1073 if (guehdr->proto_ctype == IPPROTO_UDP ||
1074 guehdr->proto_ctype == IPPROTO_UDPLITE)
1069 return -EOPNOTSUPP; 1075 return -EOPNOTSUPP;
1070 1076
1071 skb_set_transport_header(skb, -(int)sizeof(struct icmphdr)); 1077 skb_set_transport_header(skb, -(int)sizeof(struct icmphdr));