Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 33216
b: refs/heads/master
c: 30a584d
h: refs/heads/master
v: v3
  • Loading branch information
Stephen Hemminger authored and David S. Miller committed Aug 5, 2006
1 parent d8ddba9 commit 99cc2b9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b9e2cc0f0e47ad351349156018ef8a365e9c6d25
refs/heads/master: 30a584d944fbd599d4a8f470f75bf7af1a15b466
20 changes: 8 additions & 12 deletions trunk/net/llc/af_llc.c
Original file line number Diff line number Diff line change
Expand Up @@ -784,24 +784,20 @@ static int llc_ui_recvmsg(struct kiocb *iocb, struct socket *sock,
copied += used;
len -= used;

if (used + offset < skb->len)
continue;

if (!(flags & MSG_PEEK)) {
sk_eat_skb(sk, skb, 0);
*seq = 0;
}

/* For non stream protcols we get one packet per recvmsg call */
if (sk->sk_type != SOCK_STREAM)
goto copy_uaddr;

/* Partial read */
if (used + offset < skb->len)
continue;
} while (len > 0);

/*
* According to UNIX98, msg_name/msg_namelen are ignored
* on connected socket. -ANK
* But... af_llc still doesn't have separate sets of methods for
* SOCK_DGRAM and SOCK_STREAM :-( So we have to do this test, will
* eventually fix this tho :-) -acme
*/
if (sk->sk_type == SOCK_DGRAM)
goto copy_uaddr;
out:
release_sock(sk);
return copied;
Expand Down
4 changes: 2 additions & 2 deletions trunk/net/llc/llc_sap.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ void llc_save_primitive(struct sock *sk, struct sk_buff* skb, u8 prim)
{
struct sockaddr_llc *addr;

if (skb->sk->sk_type == SOCK_STREAM) /* See UNIX98 */
return;
/* save primitive for use by the user. */
addr = llc_ui_skb_cb(skb);

memset(addr, 0, sizeof(*addr));
addr->sllc_family = sk->sk_family;
addr->sllc_arphrd = skb->dev->type;
addr->sllc_test = prim == LLC_TEST_PRIM;
Expand Down

0 comments on commit 99cc2b9

Please sign in to comment.