Netfilter-Devel Archive on lore.kernel.org
 help / color / Atom feed
From: Florian Westphal <fw@strlen.de>
To: Jeremy Sowden <jeremy@azazel.net>
Cc: "Netfilter Devel" <netfilter-devel@vger.kernel.org>,
	"Franta Hanzlík" <franta@hanzlici.cz>
Subject: Re: [PATCH xtables-addons 2/2] xt_DHCPMAC: replaced skb_make_writable with skb_ensure_writable.
Date: Sun, 11 Aug 2019 20:42:17 +0200
Message-ID: <20190811184217.yse5h3diubi7uvas@breakpoint.cc> (raw)
In-Reply-To: <20190811131617.10365-2-jeremy@azazel.net>

Jeremy Sowden <jeremy@azazel.net> wrote:
> skb_make_writable was removed from the kernel in 5.2 and its callers
> converted to use skb_ensure_writable.
> 
> Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
> ---
>  extensions/xt_DHCPMAC.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/extensions/xt_DHCPMAC.c b/extensions/xt_DHCPMAC.c
> index 47f9534f74c7..412f8984d326 100644
> --- a/extensions/xt_DHCPMAC.c
> +++ b/extensions/xt_DHCPMAC.c
> @@ -96,7 +96,7 @@ dhcpmac_tg(struct sk_buff *skb, const struct xt_action_param *par)
>  	struct udphdr udpbuf, *udph;
>  	unsigned int i;
>  
> -	if (!skb_make_writable(skb, 0))
> +	if (!skb_ensure_writable(skb, 0))
>  		return NF_DROP;

You need to drop the "!".  The "0" argument is suspicious as well, i
guess this needs to be "skb->len".

  reply index

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-11  9:40 xtables addons build on 5.2.6 ends with error: 'struct shash_desc' has no member named 'flags' Franta Hanzlík
2019-08-11 12:42 ` Jeremy Sowden
2019-08-11 13:16 ` [PATCH xtables-addons 1/2] xt_pknock, xt_SYSRQ: don't set shash_desc::flags Jeremy Sowden
2019-08-11 13:16   ` [PATCH xtables-addons 2/2] xt_DHCPMAC: replaced skb_make_writable with skb_ensure_writable Jeremy Sowden
2019-08-11 18:42     ` Florian Westphal [this message]
2019-08-12 11:06       ` Jeremy Sowden
2019-08-12 11:57 ` [PATCH xtables-addons v2 0/2] Kernel API updates Jeremy Sowden
2019-08-12 11:57   ` [PATCH xtables-addons v2 1/2] xt_pknock, xt_SYSRQ: don't set shash_desc::flags Jeremy Sowden
2019-08-12 15:17     ` Jan Engelhardt
2019-08-12 16:57       ` Jeremy Sowden
2019-08-19 19:34         ` Franta Hanzlík
2019-09-01 17:04           ` Jeremy Sowden
2019-09-06  8:38     ` Jan Engelhardt
2019-08-12 11:57   ` [PATCH xtables-addons v2 2/2] xt_DHCPMAC: replaced skb_make_writable with skb_ensure_writable Jeremy Sowden
2019-08-12 14:54   ` [PATCH xtables-addons v2 0/2] Kernel API updates Jeremy Sowden

Reply instructions:

You may reply publically 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=20190811184217.yse5h3diubi7uvas@breakpoint.cc \
    --to=fw@strlen.de \
    --cc=franta@hanzlici.cz \
    --cc=jeremy@azazel.net \
    --cc=netfilter-devel@vger.kernel.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

Netfilter-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/netfilter-devel/0 netfilter-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 netfilter-devel netfilter-devel/ https://lore.kernel.org/netfilter-devel \
		netfilter-devel@vger.kernel.org netfilter-devel@archiver.kernel.org
	public-inbox-index netfilter-devel


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.netfilter-devel


AGPL code for this site: git clone https://public-inbox.org/ public-inbox