summaryrefslogtreecommitdiffstats
path: root/net/llc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-08-06 08:58:24 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-08-06 08:58:24 -0700
commitcb3f1e7b835f6fe0fc09574381fe54daf6600001 (patch)
tree80db1baa3e59b65a2bb2db833af8eb336459404f /net/llc
parent3e3183bab0257a6d02038658c53b491e1378612f (diff)
parent558e10a57db10de355ee97712d2b6df49e9b7849 (diff)
downloadop-kernel-dev-cb3f1e7b835f6fe0fc09574381fe54daf6600001.zip
op-kernel-dev-cb3f1e7b835f6fe0fc09574381fe54daf6600001.tar.gz
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: [LAPB]: Fix windowsize check [TCP]: Fixes IW > 2 cases when TCP is application limited [PKT_SCHED] RED: Fix overflow in calculation of queue average [LLX]: SOCK_DGRAM interface fixes [PKT_SCHED]: Return ENOENT if qdisc module is unavailable [BRIDGE]: netlink status fix
Diffstat (limited to 'net/llc')
-rw-r--r--net/llc/af_llc.c20
-rw-r--r--net/llc/llc_sap.c4
2 files changed, 10 insertions, 14 deletions
diff --git a/net/llc/af_llc.c b/net/llc/af_llc.c
index d6cfe84..2652ead 100644
--- a/net/llc/af_llc.c
+++ b/net/llc/af_llc.c
@@ -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;
diff --git a/net/llc/llc_sap.c b/net/llc/llc_sap.c
index 20c4eb5..42eb0c3 100644
--- a/net/llc/llc_sap.c
+++ b/net/llc/llc_sap.c
@@ -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;
OpenPOWER on IntegriCloud