Commit b85daee0 authored by David S. Miller's avatar David S. Miller

[AF_PACKET]: Remove bogus checks added to packet_sendmsg().

These broke existing apps, and the checks are superfluous
as the values being verified aren't even used.
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c62dba90
...@@ -761,12 +761,6 @@ static int packet_sendmsg(struct kiocb *iocb, struct socket *sock, ...@@ -761,12 +761,6 @@ static int packet_sendmsg(struct kiocb *iocb, struct socket *sock,
if (dev->hard_header) { if (dev->hard_header) {
int res; int res;
err = -EINVAL; err = -EINVAL;
if (saddr) {
if (saddr->sll_halen != dev->addr_len)
goto out_free;
if (saddr->sll_hatype != dev->type)
goto out_free;
}
res = dev->hard_header(skb, dev, ntohs(proto), addr, NULL, len); res = dev->hard_header(skb, dev, ntohs(proto), addr, NULL, len);
if (sock->type != SOCK_DGRAM) { if (sock->type != SOCK_DGRAM) {
skb->tail = skb->data; skb->tail = skb->data;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment