Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 63819
b: refs/heads/master
c: ff4ca82
h: refs/heads/master
i:
  63817: 7645ea8
  63815: 8874f3a
v: v3
  • Loading branch information
Pablo Neira Ayuso authored and David S. Miller committed Aug 8, 2007
1 parent 5b25a46 commit 2305c65
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 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: 3af8e31cf57646284b5f77f9d57d2c22fa77485a
refs/heads/master: ff4ca8273eafbba875a86d333e059e78f292107f
17 changes: 9 additions & 8 deletions trunk/net/netfilter/nf_conntrack_netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -1052,17 +1052,18 @@ ctnetlink_new_conntrack(struct sock *ctnl, struct sk_buff *skb,
}
/* implicit 'else' */

/* we only allow nat config for new conntracks */
if (cda[CTA_NAT_SRC-1] || cda[CTA_NAT_DST-1]) {
err = -EINVAL;
goto out_unlock;
}

/* We manipulate the conntrack inside the global conntrack table lock,
* so there's no need to increase the refcount */
err = -EEXIST;
if (!(nlh->nlmsg_flags & NLM_F_EXCL))
err = ctnetlink_change_conntrack(nf_ct_tuplehash_to_ctrack(h), cda);
if (!(nlh->nlmsg_flags & NLM_F_EXCL)) {
/* we only allow nat config for new conntracks */
if (cda[CTA_NAT_SRC-1] || cda[CTA_NAT_DST-1]) {
err = -EINVAL;
goto out_unlock;
}
err = ctnetlink_change_conntrack(nf_ct_tuplehash_to_ctrack(h),
cda);
}

out_unlock:
write_unlock_bh(&nf_conntrack_lock);
Expand Down

0 comments on commit 2305c65

Please sign in to comment.