Thread (4 messages) 4 messages, 2 authors, 2012-01-11

Re: Possible bug in ac_msg_is_request_for_ac

From: Kurt Van Dijck <hidden>
Date: 2012-01-10 15:02:27

Felix,

Thanks for pointing out this issue.

By a second look, this function is only used to decide if a request
from source address 0xfe may be sent out.
I'm sure my intent is conform to the specification, but I'm
not sure anymore taht I should enforce such policy inside the kernel.

I may as well delete the function completely ...

Any opinion?

Kurt

On Tue, Jan 10, 2012 at 01:34:08PM +0100, Felix Obenhuber wrote:
Hi Kurt,

just wondered about the last line in ac_msg_is_request_for_ac
https://gitorious.org/~kurt-vd/linux-can/can-j1939-modules/blobs/master/net/can/j1939/address-claim.c

static inline int ac_msg_is_request_for_ac(struct sk_buff *skb)
{
        [...]
	req_pgn = skb->data[0] | (skb->data[1] << 8) | (skb->data[2] << 16);
	return req_pgn = PGN_ADDRESS_CLAIMED;
                    ^^^^^^

Think here's a equal sign missing cause you always return
PGN_ADDRESS_CLAIMED.

Cheers,

Felix
              



--
To unsubscribe from this list: send the line "unsubscribe linux-can" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help