Skip to content

Commit

Permalink
ipv4: remove redundant verification code
Browse files Browse the repository at this point in the history
The check if error signaling is wanted (inet->recverr != 0) is done by
the caller: raw.c:raw_err() and udp.c:__udp4_lib_err(), so there is no
need to check this condition again.

Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Hagen Paul Pfeifer authored and David S. Miller committed Apr 2, 2010
1 parent 430e55b commit d4fc6db
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions net/ipv4/ip_sockglue.c
Original file line number Diff line number Diff line change
Expand Up @@ -286,12 +286,8 @@ int ip_ra_control(struct sock *sk, unsigned char on,
void ip_icmp_error(struct sock *sk, struct sk_buff *skb, int err,
__be16 port, u32 info, u8 *payload)
{
struct inet_sock *inet = inet_sk(sk);
struct sock_exterr_skb *serr;

if (!inet->recverr)
return;

skb = skb_clone(skb, GFP_ATOMIC);
if (!skb)
return;
Expand Down

0 comments on commit d4fc6db

Please sign in to comment.