diff options
Diffstat (limited to 'net/core/skbuff.c')
| -rw-r--r-- | net/core/skbuff.c | 5 | 
1 files changed, 4 insertions, 1 deletions
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 1ba8f0163744..e578544b2cc7 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -4549,7 +4549,7 @@ struct sk_buff *sock_dequeue_err_skb(struct sock *sk)  	if (skb && (skb_next = skb_peek(q))) {  		icmp_next = is_icmp_err_skb(skb_next);  		if (icmp_next) -			sk->sk_err = SKB_EXT_ERR(skb_next)->ee.ee_origin; +			sk->sk_err = SKB_EXT_ERR(skb_next)->ee.ee_errno;  	}  	spin_unlock_irqrestore(&q->lock, flags); @@ -5786,6 +5786,9 @@ int skb_mpls_dec_ttl(struct sk_buff *skb)  	if (unlikely(!eth_p_mpls(skb->protocol)))  		return -EINVAL; +	if (!pskb_may_pull(skb, skb_network_offset(skb) + MPLS_HLEN)) +		return -ENOMEM; +  	lse = be32_to_cpu(mpls_hdr(skb)->label_stack_entry);  	ttl = (lse & MPLS_LS_TTL_MASK) >> MPLS_LS_TTL_SHIFT;  	if (!--ttl)  |