Guest User

connmark_trace.patch

a guest
Aug 8th, 2012
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. --- linux-3.2.24/net/ipv4/netfilter/ipt_LOG.c 2012-07-25 03:11:50.000000000 +0000
  2. +++ ../linux-3.2.24/net/ipv4/netfilter/ipt_LOG.c 2012-08-08 17:04:52.000000000 +0000
  3. @@ -25,6 +25,7 @@
  4. #include <linux/netfilter_ipv4/ipt_LOG.h>
  5. #include <net/netfilter/nf_log.h>
  6. #include <net/netfilter/xt_log.h>
  7. +#include <net/netfilter/nf_conntrack.h>
  8.  
  9. MODULE_LICENSE("GPL");
  10. MODULE_AUTHOR("Netfilter Core Team <[email protected]>");
  11. @@ -348,6 +349,13 @@
  12. if (!iphoff && skb->mark)
  13. sb_add(m, "MARK=0x%x ", skb->mark);
  14.  
  15. + /* DEBUGGING CONNTRACK */
  16. + enum ip_conntrack_info _ctinfo;
  17. + const struct nf_conn *_nf_conn;
  18. + _nf_conn = nf_ct_get(skb, &_ctinfo);
  19. + if (_nf_conn)
  20. + sb_add(m, "CONNMARK=0x%x/0x%x ", _nf_conn->mark, _ctinfo);
  21. +
  22. /* Proto Max log string length */
  23. /* IP: 40+46+6+11+127 = 230 */
  24. /* TCP: 10+max(25,20+30+13+9+32+11+127) = 252 */
Advertisement
Add Comment
Please, Sign In to add comment