diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/netfilter/nfnetlink_log.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c index b1e3a0579416..8117fba8e661 100644 --- a/net/netfilter/nfnetlink_log.c +++ b/net/netfilter/nfnetlink_log.c | |||
@@ -649,7 +649,8 @@ nfulnl_log_packet(struct net *net, | |||
649 | + nla_total_size(sizeof(u_int32_t)) /* gid */ | 649 | + nla_total_size(sizeof(u_int32_t)) /* gid */ |
650 | + nla_total_size(plen) /* prefix */ | 650 | + nla_total_size(plen) /* prefix */ |
651 | + nla_total_size(sizeof(struct nfulnl_msg_packet_hw)) | 651 | + nla_total_size(sizeof(struct nfulnl_msg_packet_hw)) |
652 | + nla_total_size(sizeof(struct nfulnl_msg_packet_timestamp)); | 652 | + nla_total_size(sizeof(struct nfulnl_msg_packet_timestamp)) |
653 | + nla_total_size(sizeof(struct nfgenmsg)); /* NLMSG_DONE */ | ||
653 | 654 | ||
654 | if (in && skb_mac_header_was_set(skb)) { | 655 | if (in && skb_mac_header_was_set(skb)) { |
655 | size += nla_total_size(skb->dev->hard_header_len) | 656 | size += nla_total_size(skb->dev->hard_header_len) |
@@ -692,8 +693,7 @@ nfulnl_log_packet(struct net *net, | |||
692 | goto unlock_and_release; | 693 | goto unlock_and_release; |
693 | } | 694 | } |
694 | 695 | ||
695 | if (inst->skb && | 696 | if (inst->skb && size > skb_tailroom(inst->skb)) { |
696 | size > skb_tailroom(inst->skb) - sizeof(struct nfgenmsg)) { | ||
697 | /* either the queue len is too high or we don't have | 697 | /* either the queue len is too high or we don't have |
698 | * enough room in the skb left. flush to userspace. */ | 698 | * enough room in the skb left. flush to userspace. */ |
699 | __nfulnl_flush(inst); | 699 | __nfulnl_flush(inst); |