Commit 82251615 authored by Pablo Neira Ayuso's avatar Pablo Neira Ayuso

netfilter: nfnetlink_log: remove unnecessary error messages

In case of OOM, there's nothing userspace can do.

If there's no room to put the payload in __build_packet_message(),
jump to nla_put_failure which already performs the corresponding
error reporting.
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent 56768644
...@@ -334,9 +334,6 @@ nfulnl_alloc_skb(struct net *net, u32 peer_portid, unsigned int inst_size, ...@@ -334,9 +334,6 @@ nfulnl_alloc_skb(struct net *net, u32 peer_portid, unsigned int inst_size,
skb = nfnetlink_alloc_skb(net, pkt_size, skb = nfnetlink_alloc_skb(net, pkt_size,
peer_portid, GFP_ATOMIC); peer_portid, GFP_ATOMIC);
if (!skb)
pr_err("nfnetlink_log: can't even alloc %u bytes\n",
pkt_size);
} }
} }
...@@ -568,10 +565,8 @@ __build_packet_message(struct nfnl_log_net *log, ...@@ -568,10 +565,8 @@ __build_packet_message(struct nfnl_log_net *log,
struct nlattr *nla; struct nlattr *nla;
int size = nla_attr_size(data_len); int size = nla_attr_size(data_len);
if (skb_tailroom(inst->skb) < nla_total_size(data_len)) { if (skb_tailroom(inst->skb) < nla_total_size(data_len))
printk(KERN_WARNING "nfnetlink_log: no tailroom!\n"); goto nla_put_failure;
return -1;
}
nla = (struct nlattr *)skb_put(inst->skb, nla_total_size(data_len)); nla = (struct nlattr *)skb_put(inst->skb, nla_total_size(data_len));
nla->nla_type = NFULA_PAYLOAD; nla->nla_type = NFULA_PAYLOAD;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment