Re: TCP-packet with PUSH flag with wrong payload data in LOCAL_OUT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jan 22, 2009 at 8:11 AM, Jan Engelhardt <jengelh@xxxxxxxxxx> wrote:
> Very well. But there still is another case I can think of -
> non-linear skb.
>
>        struct tcphdr tcpbuf;
>        const struct tcphdr *th;
>
>        th = skb_header_pointer(skb, ip_hdrlen(skb), sizeof(tcpbuf), &tcpbuf);
>        if (th->psh && ntohs(tcp->dest) == 80) {
>                char n[4];
>
>                if (skb_copy_bits(skb, ip_hdrlen(skb) + 4*tcp->doff,
>                    n, sizeof(n)) >= 0)
>                        printk("data: %02x %02x %02x %02x\n", n[0], n[1],
>                               n[2], n[3]);
>        }

Wouldn't

if ((skb_linearize(skb) != 0) && net_ratelimit())
      printk("skb is non-linear, but failed to linearize");

be more preferable?
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux