[Click] wifi llc handling problem in Click 1.5

Eddie Kohler kohler at cs.ucla.edu
Sat Sep 16 23:18:20 EDT 2006


Hi Mathias,

I think that code was written expecting that C would add a trailing null byte, 
as it is required to.  In fact C reports that "sizeof("\xAA\xAA\x03\x00\x00")" 
is 6.  The last byte is 0.  So I think your diagnosis is wrong although maybe 
you are really seeing a problem.

Your diagnosis of the shift_data() problem is right, though!  The easiest 
change is probably to shift the packet's headroom as well as its currently 
active data area (which would shift the old ether header), and that is what 
I've done.  This will affect performance, however, since we are shifting more 
data per misaligned packet.  In our defense if you are having to align packets 
you have performance problems anyway.

Report any problems you see.  Thanks.

Eddie




Mathias Kurth wrote:
> Hi,
> 
> It seems there is something wrong with the wifi llc header 
> in wifi.h. It does not consist of 6 bytes as expected:
> 
> #define wifi_llc_header ((const uint8_t *) "\xAA\xAA\x03\x00\x00")
> 
> The result is that the org-code is not zero and most of the 
> client station's wifi drivers do not accept the generated frame.
> 
> BTW: We've got another problem with the align element. It uses 
> the method Packet::shift_data(), which moves the data part of 
> the packet and adjusts the data and ether_header pointers according 
> to the offset. But if ether_header() points to a valid Ethernet header, 
> the header is not moved in memory so that ether_header() does not point to 
> the header any more. Accessing ether_header() afterwards results 
> obviously in trash data. 
> Is it a bug? Or is the behavior intentional and we use the 
> ether_header() in a wrong way?
> 
> Kind regards,
> Mathias 
> 
>  
> 
>  
> 
> 
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click


More information about the click mailing list