diff mbox series

[SRU,Xenial,1/1] Revert "sit: reload iphdr in ipip6_rcv"

Message ID 837978d279d9e2c86a82f8561e23a1992498466b.1527111107.git.joseph.salisbury@canonical.com
State New
Headers show
Series Revert "sit: reload iphdr in ipip6_rcv" | expand

Commit Message

Joseph Salisbury May 25, 2018, 11:48 a.m. UTC
From: "David S. Miller" <davem@davemloft.net>

BugLink: http://bugs.launchpad.net/bugs/1772775

This reverts commit b699d0035836f6712917a41e7ae58d84359b8ff9.

As per Eric Dumazet, the pskb_may_pull() is a NOP in this
particular case, so the 'iph' reload is unnecessary.

Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit f4eb17e1efe538d4da7d574bedb00a8dafcc26b7)
Signed-off-by: Joseph Salisbury <joseph.salisbury@canonical.com>
---
 net/ipv6/sit.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Kleber Sacilotto de Souza June 4, 2018, 11:05 p.m. UTC | #1
On 05/25/18 04:48, Joseph Salisbury wrote:
> From: "David S. Miller" <davem@davemloft.net>
> 
> BugLink: http://bugs.launchpad.net/bugs/1772775
> 
> This reverts commit b699d0035836f6712917a41e7ae58d84359b8ff9.
> 
> As per Eric Dumazet, the pskb_may_pull() is a NOP in this
> particular case, so the 'iph' reload is unnecessary.
> 
> Signed-off-by: David S. Miller <davem@davemloft.net>
> (cherry picked from commit f4eb17e1efe538d4da7d574bedb00a8dafcc26b7)
> Signed-off-by: Joseph Salisbury <joseph.salisbury@canonical.com>

Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>

> ---
>  net/ipv6/sit.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
> index 51f7c32..e1e7bc0 100644
> --- a/net/ipv6/sit.c
> +++ b/net/ipv6/sit.c
> @@ -692,7 +692,6 @@ static int ipip6_rcv(struct sk_buff *skb)
>  
>  		if (iptunnel_pull_header(skb, 0, htons(ETH_P_IPV6)))
>  			goto out;
> -		iph = ip_hdr(skb);
>  
>  		err = IP_ECN_decapsulate(iph, skb);
>  		if (unlikely(err)) {
>
diff mbox series

Patch

diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
index 51f7c32..e1e7bc0 100644
--- a/net/ipv6/sit.c
+++ b/net/ipv6/sit.c
@@ -692,7 +692,6 @@  static int ipip6_rcv(struct sk_buff *skb)
 
 		if (iptunnel_pull_header(skb, 0, htons(ETH_P_IPV6)))
 			goto out;
-		iph = ip_hdr(skb);
 
 		err = IP_ECN_decapsulate(iph, skb);
 		if (unlikely(err)) {