Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 34521
b: refs/heads/master
c: 2521c12
h: refs/heads/master
i:
  34519: 20fd192
v: v3
  • Loading branch information
Pablo Neira Ayuso authored and David S. Miller committed Sep 22, 2006
1 parent 3107eca commit 94894db
Show file tree
Hide file tree
Showing 3 changed files with 19 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: b93ff78317c0b8f42830e2bb13dd8df596232528
refs/heads/master: 2521c12cf1a29f6c380b13ca32a38175f6beed08
4 changes: 4 additions & 0 deletions trunk/include/linux/netfilter/nf_conntrack_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ enum ip_conntrack_events
/* Counter highest bit has been set */
IPCT_COUNTER_FILLING_BIT = 11,
IPCT_COUNTER_FILLING = (1 << IPCT_COUNTER_FILLING_BIT),

/* Mark is set */
IPCT_MARK_BIT = 12,
IPCT_MARK = (1 << IPCT_MARK_BIT),
};

enum ip_conntrack_expect_events {
Expand Down
16 changes: 14 additions & 2 deletions trunk/net/netfilter/xt_CONNMARK.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,25 @@ target(struct sk_buff **pskb,
switch(markinfo->mode) {
case XT_CONNMARK_SET:
newmark = (*ctmark & ~markinfo->mask) | markinfo->mark;
if (newmark != *ctmark)
if (newmark != *ctmark) {
*ctmark = newmark;
#ifdef CONFIG_IP_NF_CONNTRACK_EVENTS
ip_conntrack_event_cache(IPCT_MARK, *pskb);
#else
nf_conntrack_event_cache(IPCT_MARK, *pskb);
#endif
}
break;
case XT_CONNMARK_SAVE:
newmark = (*ctmark & ~markinfo->mask) | ((*pskb)->nfmark & markinfo->mask);
if (*ctmark != newmark)
if (*ctmark != newmark) {
*ctmark = newmark;
#ifdef CONFIG_IP_NF_CONNTRACK_EVENTS
ip_conntrack_event_cache(IPCT_MARK, *pskb);
#else
nf_conntrack_event_cache(IPCT_MARK, *pskb);
#endif
}
break;
case XT_CONNMARK_RESTORE:
nfmark = (*pskb)->nfmark;
Expand Down

0 comments on commit 94894db

Please sign in to comment.