xtables-addons: fix packetscript build with 5.3
authorDENG Qingfang <dengqf6@mail2.sysu.edu.cn>
Sun, 1 Mar 2020 12:51:14 +0000 (20:51 +0800)
committerDENG Qingfang <dengqf6@mail2.sysu.edu.cn>
Sun, 1 Mar 2020 12:55:10 +0000 (20:55 +0800)
Use skb_ensure_writable instead

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
net/xtables-addons/patches/201-fix-lua-packetscript.patch

index a9fb796d0965fd4f933e8f669ef1e6da9494e797..5a016e2ae0ac120a0b8169c2c86e021d25a02a70 100644 (file)
  {
        uint32_t  verdict;
        lua_packet_segment *p;
+@@ -79,7 +79,7 @@ lua_tg(struct sk_buff *pskb, const struc
+       L = lua_envs[info->state_id]->L;
+-      if (!skb_make_writable(pskb, pskb->len))
++      if (skb_ensure_writable(pskb, pskb->len))
+               return NF_DROP;
+       /* call the function provided by --function parameter or the default 'process_packet' defined in Lua */
 @@ -88,11 +88,11 @@ lua_tg(struct sk_buff *pskb, const struc
        /* push the lua_packet_segment as a parameter */
        p = (lua_packet_segment *)lua_newuserdata(L, sizeof(lua_packet_segment));