We want to get bits .OOOO... and not as the mask would suggest .OOOOO.. when we decode the encoded bits for the download part of the gateway speed.
Reported-By: Bill Meier wmeier@newsguy.com Signed-off-by: Sven Eckelmann sven.eckelmann@gmx.de Cc: Axel Neumann neumann@cgws.de --- batman-experimental/posix/tunnel.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/batman-experimental/posix/tunnel.c b/batman-experimental/posix/tunnel.c index 8911dcc..c1aba5c 100644 --- a/batman-experimental/posix/tunnel.c +++ b/batman-experimental/posix/tunnel.c @@ -466,7 +466,7 @@ static int8_t set_tun_addr( int32_t fd, uint32_t tun_addr, char *tun_dev ) { static void get_gw_speeds( unsigned char class, int *down, int *up ) {
char sbit = (class&0x80)>>7; - char dpart = (class&0x7C)>>3; + char dpart = (class&0x78)>>3; char upart = (class&0x07);
*down= 32*(sbit+2)*(1<<dpart);