summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorRemi Denis-Courmont <remi.denis-courmont@nokia.com>2008-10-27 07:07:25 +0100
committerDavid S. Miller <davem@davemloft.net>2008-10-27 07:07:25 +0100
commitc3a90c788b743303c4d824780a3a7271693fb64a (patch)
treeb969b0607688b1e39672ab6790383554b8902c7a /net
parentPhonet: include generic link-layer header size in MAX_PHONET_HEADER (diff)
downloadlinux-c3a90c788b743303c4d824780a3a7271693fb64a.tar.xz
linux-c3a90c788b743303c4d824780a3a7271693fb64a.zip
Phonet: do not reply to indication reset packets
This fixes a potential error packet loop. Signed-off-by: Remi Denis-Courmont <remi.denis-courmont@nokia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/phonet/af_phonet.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/phonet/af_phonet.c b/net/phonet/af_phonet.c
index b9d97effebe3..defeb7a0d502 100644
--- a/net/phonet/af_phonet.c
+++ b/net/phonet/af_phonet.c
@@ -261,6 +261,8 @@ static inline int can_respond(struct sk_buff *skb)
return 0; /* we are not the destination */
if (ph->pn_res == PN_PREFIX && !pskb_may_pull(skb, 5))
return 0;
+ if (ph->pn_res == PN_COMMGR) /* indications */
+ return 0;
ph = pn_hdr(skb); /* re-acquires the pointer */
pm = pn_msg(skb);
@@ -309,7 +311,8 @@ static int send_reset_indications(struct sk_buff *rskb)
return pn_raw_send(data, sizeof(data), rskb->dev,
pn_object(oph->pn_sdev, 0x00),
- pn_object(oph->pn_rdev, oph->pn_robj), 0x10);
+ pn_object(oph->pn_rdev, oph->pn_robj),
+ PN_COMMGR);
}