Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 9831
b: refs/heads/master
c: e1c73b7
h: refs/heads/master
i:
  9829: d25b08e
  9827: 4b1907b
  9823: 0c96a73
v: v3
  • Loading branch information
Pablo Neira Ayuso authored and David S. Miller committed Oct 11, 2005
1 parent 91b204a commit ea427c2
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5bbc243aafff9ad653dc7a9fa7bcaf0b4631355a
refs/heads/master: e1c73b78e3706bd3c336d4730a01dd4081dfb7ee
9 changes: 8 additions & 1 deletion trunk/include/linux/netfilter/nfnetlink_conntrack.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,18 @@ enum ctattr_l4proto {

enum ctattr_protoinfo {
CTA_PROTOINFO_UNSPEC,
CTA_PROTOINFO_TCP_STATE,
CTA_PROTOINFO_TCP,
__CTA_PROTOINFO_MAX
};
#define CTA_PROTOINFO_MAX (__CTA_PROTOINFO_MAX - 1)

enum ctattr_protoinfo_tcp {
CTA_PROTOINFO_TCP_UNSPEC,
CTA_PROTOINFO_TCP_STATE,
__CTA_PROTOINFO_TCP_MAX
};
#define CTA_PROTOINFO_TCP_MAX (__CTA_PROTOINFO_TCP_MAX - 1)

enum ctattr_counters {
CTA_COUNTERS_UNSPEC,
CTA_COUNTERS_PACKETS,
Expand Down
4 changes: 4 additions & 0 deletions trunk/net/ipv4/netfilter/ip_conntrack_proto_tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -341,11 +341,15 @@ static int tcp_print_conntrack(struct seq_file *s,
static int tcp_to_nfattr(struct sk_buff *skb, struct nfattr *nfa,
const struct ip_conntrack *ct)
{
struct nfattr *nest_parms = NFA_NEST(skb, CTA_PROTOINFO_TCP);

read_lock_bh(&tcp_lock);
NFA_PUT(skb, CTA_PROTOINFO_TCP_STATE, sizeof(u_int8_t),
&ct->proto.tcp.state);
read_unlock_bh(&tcp_lock);

NFA_NEST_END(skb, nest_parms);

return 0;

nfattr_failure:
Expand Down

0 comments on commit ea427c2

Please sign in to comment.