@@ -117,6 +117,23 @@ TRACE_EVENT(ipv6_rcv,
);
#endif
+TRACE_EVENT(ip_local_deliver_finish,
+
+ TP_PROTO(const struct sk_buff *skb),
+
+ TP_ARGS(skb),
+
+ TP_STRUCT__entry(
+ __field(const void *, skbaddr)
+ ),
+
+ TP_fast_assign(
+ __entry->skbaddr = skb;
+ ),
+
+ TP_printk("skbaddr=%px", __entry->skbaddr)
+);
+
#endif /* _TRACE_IP_H */
/* This part must be outside protection */
@@ -244,15 +244,20 @@ int ip_local_deliver(struct sk_buff *skb)
* Reassemble IP fragments.
*/
struct net *net = dev_net(skb->dev);
+ int ret;
if (ip_is_fragment(ip_hdr(skb))) {
if (ip_defrag(net, skb, IP_DEFRAG_LOCAL_DELIVER))
return 0;
}
- return NF_HOOK(NFPROTO_IPV4, NF_INET_LOCAL_IN,
+ ret = NF_HOOK(NFPROTO_IPV4, NF_INET_LOCAL_IN,
net, NULL, skb, skb->dev, NULL,
ip_local_deliver_finish);
+ if (!ret)
+ trace_ip_local_deliver_finish(skb);
+ return ret;
+
}
EXPORT_SYMBOL(ip_local_deliver);