|
@@ -346,26 +346,25 @@ nfulnl_alloc_skb(struct net *net, u32 peer_portid, unsigned int inst_size,
|
|
|
return skb;
|
|
|
}
|
|
|
|
|
|
-static int
|
|
|
+static void
|
|
|
__nfulnl_send(struct nfulnl_instance *inst)
|
|
|
{
|
|
|
- int status = -1;
|
|
|
-
|
|
|
if (inst->qlen > 1) {
|
|
|
struct nlmsghdr *nlh = nlmsg_put(inst->skb, 0, 0,
|
|
|
NLMSG_DONE,
|
|
|
sizeof(struct nfgenmsg),
|
|
|
0);
|
|
|
- if (!nlh)
|
|
|
+ if (WARN_ONCE(!nlh, "bad nlskb size: %u, tailroom %d\n",
|
|
|
+ inst->skb->len, skb_tailroom(inst->skb))) {
|
|
|
+ kfree_skb(inst->skb);
|
|
|
goto out;
|
|
|
+ }
|
|
|
}
|
|
|
- status = nfnetlink_unicast(inst->skb, inst->net, inst->peer_portid,
|
|
|
- MSG_DONTWAIT);
|
|
|
-
|
|
|
+ nfnetlink_unicast(inst->skb, inst->net, inst->peer_portid,
|
|
|
+ MSG_DONTWAIT);
|
|
|
+out:
|
|
|
inst->qlen = 0;
|
|
|
inst->skb = NULL;
|
|
|
-out:
|
|
|
- return status;
|
|
|
}
|
|
|
|
|
|
static void
|