Skip to content
Commit de6fd99d authored by Chan Shu Tak, Alex's avatar Chan Shu Tak, Alex Committed by Paul Gortmaker
Browse files

llc2: Fix return statement of llc_stat_ev_rx_null_dsap_xid_c (and _test_c)



commit af1c0e4e upstream.

When a frame with NULL DSAP is received, llc_station_rcv is called.
In turn, llc_stat_ev_rx_null_dsap_xid_c is called to check if it is a NULL
XID frame. The return statement of llc_stat_ev_rx_null_dsap_xid_c returns 1
when the incoming frame is not a NULL XID frame and 0 otherwise. Hence, a
NULL XID response is returned unexpectedly, e.g. when the incoming frame is
a NULL TEST command.

To fix the error, simply remove the conditional operator.

A similar error in llc_stat_ev_rx_null_dsap_test_c is also fixed.

Signed-off-by: default avatarChan Shu Tak, Alex <alexchan@task.com.hk>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
parent fa6b7680
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment