Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 90708
b: refs/heads/master
c: 5f7da4d
h: refs/heads/master
v: v3
  • Loading branch information
Patrick McHardy committed Apr 14, 2008
1 parent 55ddbd0 commit 87ebe7b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 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: dd13b010368f85dfa59364ba87bfe8ae930b2832
refs/heads/master: 5f7da4d26d421f3bdf10c3bbdb86ffc3a12a84f2
6 changes: 4 additions & 2 deletions trunk/net/netfilter/nf_conntrack_proto_tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1129,11 +1129,13 @@ static int nlattr_to_tcp(struct nlattr *cda[], struct nf_conn *ct)
if (err < 0)
return err;

if (!tb[CTA_PROTOINFO_TCP_STATE])
if (tb[CTA_PROTOINFO_TCP_STATE] &&
nla_get_u8(tb[CTA_PROTOINFO_TCP_STATE]) >= TCP_CONNTRACK_MAX)
return -EINVAL;

write_lock_bh(&tcp_lock);
ct->proto.tcp.state = nla_get_u8(tb[CTA_PROTOINFO_TCP_STATE]);
if (tb[CTA_PROTOINFO_TCP_STATE])
ct->proto.tcp.state = nla_get_u8(tb[CTA_PROTOINFO_TCP_STATE]);

if (tb[CTA_PROTOINFO_TCP_FLAGS_ORIGINAL]) {
struct nf_ct_tcp_flags *attr =
Expand Down

0 comments on commit 87ebe7b

Please sign in to comment.