Skip to content

Commit

Permalink
IPv6: Print error value when skb allocation fails
Browse files Browse the repository at this point in the history
Print-out the error value when sock_alloc_send_skb() fails in
the IPv6 neighbor discovery code - can be useful for debugging.

Signed-off-by: Brian Haley <brian.haley@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Brian Haley authored and David S. Miller committed Jun 2, 2009
1 parent b61b8af commit dae9de8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions net/ipv6/ndisc.c
Original file line number Diff line number Diff line change
Expand Up @@ -465,8 +465,8 @@ struct sk_buff *ndisc_build_skb(struct net_device *dev,
1, &err);
if (!skb) {
ND_PRINTK0(KERN_ERR
"ICMPv6 ND: %s() failed to allocate an skb.\n",
__func__);
"ICMPv6 ND: %s() failed to allocate an skb, err=%d.\n",
__func__, err);
return NULL;
}

Expand Down Expand Up @@ -1562,8 +1562,8 @@ void ndisc_send_redirect(struct sk_buff *skb, struct neighbour *neigh,
1, &err);
if (buff == NULL) {
ND_PRINTK0(KERN_ERR
"ICMPv6 Redirect: %s() failed to allocate an skb.\n",
__func__);
"ICMPv6 Redirect: %s() failed to allocate an skb, err=%d.\n",
__func__, err);
goto release;
}

Expand Down

0 comments on commit dae9de8

Please sign in to comment.