[NET]: Wrap netdevice hardware header creation.
Add inline for common usage of hardware header creation, and fix bug in IPV6 mcast where the assumption about negative return is an errno. Negative return from hard_header means not enough space was available,(ie -N bytes). Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
4c94f8c0c9
commit
0c4e85813d
@@ -232,9 +232,12 @@ __teql_resolve(struct sk_buff *skb, struct sk_buff *skb_res, struct net_device *
|
||||
}
|
||||
if (neigh_event_send(n, skb_res) == 0) {
|
||||
int err;
|
||||
|
||||
read_lock(&n->lock);
|
||||
err = dev->hard_header(skb, dev, ntohs(skb->protocol), n->ha, NULL, skb->len);
|
||||
err = dev_hard_header(skb, dev, ntohs(skb->protocol),
|
||||
n->ha, NULL, skb->len);
|
||||
read_unlock(&n->lock);
|
||||
|
||||
if (err < 0) {
|
||||
neigh_release(n);
|
||||
return -EINVAL;
|
||||
|
||||
Reference in New Issue
Block a user