Changeset 16733


Ignore:
Timestamp:
2009-07-07T05:56:43+02:00 (7 years ago)
Author:
nbd
Message:

wprobe: the bpf code expects direct-access fields to be in big endian, not cpu endian

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/wprobe/src/kernel/wprobe-core.c

    r16732 r16733  
    204204wprobe_add_frame(struct wprobe_iface *dev, const struct wprobe_wlan_hdr *hdr, void *data, int len) 
    205205{ 
     206        struct wprobe_wlan_hdr *new_hdr; 
    206207        struct wprobe_filter *f; 
    207208        struct sk_buff *skb; 
     
    222223                len = WPROBE_MAX_FRAME_SIZE - skb->len; 
    223224 
    224         memcpy(skb_put(skb, f->hdrlen), hdr, sizeof(struct wprobe_wlan_hdr)); 
     225        new_hdr = (struct wprobe_wlan_hdr *) skb_put(skb, f->hdrlen); 
     226        memcpy(new_hdr, hdr, sizeof(struct wprobe_wlan_hdr)); 
     227        new_hdr->len = cpu_to_be16(new_hdr->len); 
     228 
    225229        memcpy(skb_put(skb, len), data, len); 
    226230 
Note: See TracChangeset for help on using the changeset viewer.