Przeglądaj źródła

ipv6: Remove superfluous NULL pointer check in ipv6_local_rxpmtu

The pointer to mtu_info is taken from the common buffer
of the skb, thus it can't be a NULL pointer. This patch
removes this check on mtu_info.

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Steffen Klassert 13 lat temu
rodzic
commit
c113464d43
1 zmienionych plików z 0 dodań i 4 usunięć
  1. 0 4
      net/ipv6/datagram.c

+ 0 - 4
net/ipv6/datagram.c

@@ -297,10 +297,6 @@ void ipv6_local_rxpmtu(struct sock *sk, struct flowi6 *fl6, u32 mtu)
 	ipv6_addr_copy(&iph->daddr, &fl6->daddr);
 	ipv6_addr_copy(&iph->daddr, &fl6->daddr);
 
 
 	mtu_info = IP6CBMTU(skb);
 	mtu_info = IP6CBMTU(skb);
-	if (!mtu_info) {
-		kfree_skb(skb);
-		return;
-	}
 
 
 	mtu_info->ip6m_mtu = mtu;
 	mtu_info->ip6m_mtu = mtu;
 	mtu_info->ip6m_addr.sin6_family = AF_INET6;
 	mtu_info->ip6m_addr.sin6_family = AF_INET6;