diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-11-20 03:02:39 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-11-20 03:02:39 -0500 |
commit | fbc2a06056c9aa3cb8c44bf1cfeb1d260e229e5c (patch) | |
tree | feb2a1c13ad3dff5a8c7ab3c0265e8eca7a0c5a3 /net/phonet/af_phonet.c | |
parent | a3d732f93785da17e0137210deadb4616f5536fc (diff) | |
parent | ee2f6cc7f9ea2542ad46070ed62ba7aa04d08871 (diff) |
Merge branch 'linus' into x86/uv
Diffstat (limited to 'net/phonet/af_phonet.c')
-rw-r--r-- | net/phonet/af_phonet.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/net/phonet/af_phonet.c b/net/phonet/af_phonet.c index b9d97effebe3..7ab30f668b5a 100644 --- a/net/phonet/af_phonet.c +++ b/net/phonet/af_phonet.c | |||
@@ -144,8 +144,8 @@ static int pn_send(struct sk_buff *skb, struct net_device *dev, | |||
144 | struct phonethdr *ph; | 144 | struct phonethdr *ph; |
145 | int err; | 145 | int err; |
146 | 146 | ||
147 | if (skb->len + 2 > 0xffff) { | 147 | if (skb->len + 2 > 0xffff /* Phonet length field limit */ || |
148 | /* Phonet length field would overflow */ | 148 | skb->len + sizeof(struct phonethdr) > dev->mtu) { |
149 | err = -EMSGSIZE; | 149 | err = -EMSGSIZE; |
150 | goto drop; | 150 | goto drop; |
151 | } | 151 | } |
@@ -261,6 +261,8 @@ static inline int can_respond(struct sk_buff *skb) | |||
261 | return 0; /* we are not the destination */ | 261 | return 0; /* we are not the destination */ |
262 | if (ph->pn_res == PN_PREFIX && !pskb_may_pull(skb, 5)) | 262 | if (ph->pn_res == PN_PREFIX && !pskb_may_pull(skb, 5)) |
263 | return 0; | 263 | return 0; |
264 | if (ph->pn_res == PN_COMMGR) /* indications */ | ||
265 | return 0; | ||
264 | 266 | ||
265 | ph = pn_hdr(skb); /* re-acquires the pointer */ | 267 | ph = pn_hdr(skb); /* re-acquires the pointer */ |
266 | pm = pn_msg(skb); | 268 | pm = pn_msg(skb); |
@@ -309,7 +311,8 @@ static int send_reset_indications(struct sk_buff *rskb) | |||
309 | 311 | ||
310 | return pn_raw_send(data, sizeof(data), rskb->dev, | 312 | return pn_raw_send(data, sizeof(data), rskb->dev, |
311 | pn_object(oph->pn_sdev, 0x00), | 313 | pn_object(oph->pn_sdev, 0x00), |
312 | pn_object(oph->pn_rdev, oph->pn_robj), 0x10); | 314 | pn_object(oph->pn_rdev, oph->pn_robj), |
315 | PN_COMMGR); | ||
313 | } | 316 | } |
314 | 317 | ||
315 | 318 | ||