Commit cd33bdcb authored by Xin Long's avatar Xin Long Committed by Jakub Kicinski
Browse files

ping: remove pr_err from ping_lookup



As Jakub noticed, prints should be avoided on the datapath.
Also, as packets would never come to the else branch in
ping_lookup(), remove pr_err() from ping_lookup().

Fixes: 35a79e64 ("ping: fix the dif and sdif check in ping_lookup")
Reported-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
Link: https://lore.kernel.org/r/1ef3f2fcd31bd681a193b1fcf235eee1603819bd.1645674068.git.lucien.xin@gmail.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent fe203715
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -187,7 +187,6 @@ static struct sock *ping_lookup(struct net *net, struct sk_buff *skb, u16 ident)
			 (int)ident, &ipv6_hdr(skb)->daddr, dif);
			 (int)ident, &ipv6_hdr(skb)->daddr, dif);
#endif
#endif
	} else {
	} else {
		pr_err("ping: protocol(%x) is not supported\n", ntohs(skb->protocol));
		return NULL;
		return NULL;
	}
	}