Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 136108
b: refs/heads/master
c: fa56ddd
h: refs/heads/master
v: v3
  • Loading branch information
Alina Friedrichsen authored and John W. Linville committed Mar 28, 2009
1 parent c281284 commit 22c18cc
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 3 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: c44a4366649aca4f5b4a51ff71d4c9cde3b7c9da
refs/heads/master: fa56dddd6720c8d4b9fa4c942377d2a019cf3708
12 changes: 12 additions & 0 deletions trunk/net/ax25/af_ax25.c
Original file line number Diff line number Diff line change
Expand Up @@ -1435,6 +1435,11 @@ static int ax25_sendmsg(struct kiocb *iocb, struct socket *sock,
size_t size;
int lv, err, addr_len = msg->msg_namelen;

/* AX.25 empty data frame has no meaning : don't send */
if (len == 0) {
return (0);
}

if (msg->msg_flags & ~(MSG_DONTWAIT|MSG_EOR|MSG_CMSG_COMPAT))
return -EINVAL;

Expand Down Expand Up @@ -1634,6 +1639,13 @@ static int ax25_recvmsg(struct kiocb *iocb, struct socket *sock,
skb_reset_transport_header(skb);
copied = skb->len;

/* AX.25 empty data frame has no meaning : ignore it */
if (copied == 0) {
err = copied;
skb_free_datagram(sk, skb);
goto out;
}

if (copied > size) {
copied = size;
msg->msg_flags |= MSG_TRUNC;
Expand Down
3 changes: 2 additions & 1 deletion trunk/net/mac80211/ibss.c
Original file line number Diff line number Diff line change
Expand Up @@ -812,8 +812,9 @@ int ieee80211_ibss_commit(struct ieee80211_sub_if_data *sdata)

ifibss->ibss_join_req = jiffies;
ifibss->state = IEEE80211_IBSS_MLME_SEARCH;
set_bit(IEEE80211_IBSS_REQ_RUN, &ifibss->request);

return ieee80211_sta_find_ibss(sdata);
return 0;
}

int ieee80211_ibss_set_ssid(struct ieee80211_sub_if_data *sdata, char *ssid, size_t len)
Expand Down
11 changes: 10 additions & 1 deletion trunk/net/netrom/af_netrom.c
Original file line number Diff line number Diff line change
Expand Up @@ -1037,6 +1037,10 @@ static int nr_sendmsg(struct kiocb *iocb, struct socket *sock,
unsigned char *asmptr;
int size;

/* Netrom empty data frame has no meaning : don't send */
if (len == 0)
return 0;

if (msg->msg_flags & ~(MSG_DONTWAIT|MSG_EOR|MSG_CMSG_COMPAT))
return -EINVAL;

Expand Down Expand Up @@ -1171,6 +1175,11 @@ static int nr_recvmsg(struct kiocb *iocb, struct socket *sock,
skb_reset_transport_header(skb);
copied = skb->len;

/* NetRom empty data frame has no meaning : ignore it */
if (copied == 0) {
goto out;
}

if (copied > size) {
copied = size;
msg->msg_flags |= MSG_TRUNC;
Expand All @@ -1186,7 +1195,7 @@ static int nr_recvmsg(struct kiocb *iocb, struct socket *sock,

msg->msg_namelen = sizeof(*sax);

skb_free_datagram(sk, skb);
out: skb_free_datagram(sk, skb);

release_sock(sk);
return copied;
Expand Down

0 comments on commit 22c18cc

Please sign in to comment.