Phonet: do not reply to indication reset packets

This fixes a potential error packet loop.

Signed-off-by: Remi Denis-Courmont <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
Remi Denis-Courmont 2008-10-26 23:07:25 -07:00 • committed by David S. Miller
commit c3a90c788b
2 changed files with 5 additions and 1 deletions

View file

@ -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);
}