Skip to content

Commit

Permalink
Staging: batman-adv: Always receive when discarding.
Browse files Browse the repository at this point in the history
It does not matter if the interface is to be activated or not, we must
read the packet in order that it be discarded.

Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Andrew Lunn authored and Greg Kroah-Hartman committed Mar 4, 2010
1 parent da6b9ba commit 4088c7c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/staging/batman-adv/routing.c
Original file line number Diff line number Diff line change
Expand Up @@ -1177,8 +1177,7 @@ static int discard_one_packet(struct batman_if *batman_if,
{
int result = -EAGAIN;

if ((batman_if->if_active == IF_TO_BE_ACTIVATED)
&& (batman_if->raw_sock)) {
if (batman_if->raw_sock) {
result = receive_raw_packet(batman_if->raw_sock,
packet_buff,
PACKBUFF_SIZE);
Expand Down

0 comments on commit 4088c7c

Please sign in to comment.