From: Fred Moyer <fred@redhotpenguin.com>
To: netfilter@lists.netfilter.org
Subject: Setting skb->len
Date: Thu, 30 Aug 2007 15:12:54 -0700 [thread overview]
Message-ID: <46D740E6.8030705@redhotpenguin.com> (raw)
Hi netfilter list,
This is my first post to this list, so if this question is better
handled by a different list, or offtopic, please kindly inform me that
is the case. My C is a bit rusty also, so please forgive me if I'm
asking something that is not clear. In addition, this is my first
netfilter module :-)
In a netfilter module I am working on I alter the packet data such that
the length of the packet is reduced by an amount diff. I then set
skb->len via the following code:
skb->len -= diff;
This worked fine with gcc 2.96 but when cross-compiling this module for
OpenWrt with gcc 4.1.2 I get the following error:
error: assignment of read-only member 'len'
Is there a function I can use to set skb->len or do I need to poke
around the kernel code and modify this member to be read-write. I
accept the fact that what I'm doing is probably a hack, but I would like
to get this module working first, then make it well coded second.
Thanks in advance for any advice,
Fred
reply other threads:[~2007-08-30 22:12 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46D740E6.8030705@redhotpenguin.com \
--to=fred@redhotpenguin.com \
--cc=netfilter@lists.netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox