diff options
author | Marek Lindner <lindner_marek@yahoo.de> | 2010-10-19 11:59:15 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-10-19 10:04:16 -0700 |
commit | 1bc80e95274a96f1bd6af25bb65f33cef57f6704 (patch) | |
tree | 6dd07cd851554f2844a6a94604c6054d184b0b8b | |
parent | 15f00687e3b7b88c23d498d2c65e5911d8efa214 (diff) | |
download | op-kernel-dev-1bc80e95274a96f1bd6af25bb65f33cef57f6704.zip op-kernel-dev-1bc80e95274a96f1bd6af25bb65f33cef57f6704.tar.gz |
Staging: batman-adv: process OGMs bigger than MAX_AGGREGATION_BYTES
Reported-by: Sam Yeung <sam.cwyeung@gmail.com>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/staging/batman-adv/aggregation.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/staging/batman-adv/aggregation.c b/drivers/staging/batman-adv/aggregation.c index 16b268e..08624d4 100644 --- a/drivers/staging/batman-adv/aggregation.c +++ b/drivers/staging/batman-adv/aggregation.c @@ -257,9 +257,7 @@ void receive_aggr_bat_packet(struct ethhdr *ethhdr, unsigned char *packet_buff, batman_packet = (struct batman_packet *)packet_buff; - while (aggregated_packet(buff_pos, packet_len, - batman_packet->num_hna)) { - + do { /* network to host order for our 32bit seqno, and the orig_interval. */ batman_packet->seqno = ntohl(batman_packet->seqno); @@ -272,5 +270,6 @@ void receive_aggr_bat_packet(struct ethhdr *ethhdr, unsigned char *packet_buff, buff_pos += BAT_PACKET_LEN + hna_len(batman_packet); batman_packet = (struct batman_packet *) (packet_buff + buff_pos); - } + } while (aggregated_packet(buff_pos, packet_len, + batman_packet->num_hna)); } |