Created
October 10, 2013 20:17
-
-
Save rbgarga/6924868 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6934 if (action == PF_PASS || r->action == PF_DROP) { | |
6935 dirndx = (dir == PF_OUT); | |
6936 r->packets[dirndx]++; | |
6937 r->bytes[dirndx] += pd.tot_len; | |
6938 if (a != NULL) { | |
6939 a->packets[dirndx]++; | |
6940 a->bytes[dirndx] += pd.tot_len; | |
6941 } | |
6942 if (s != NULL) { | |
6943 if (s->nat_rule.ptr != NULL) { | |
6944 s->nat_rule.ptr->packets[dirndx]++; | |
6945 s->nat_rule.ptr->bytes[dirndx] += pd.tot_len; | |
6946 } | |
6947 if (s->src_node != NULL) { | |
6948 s->src_node->packets[dirndx]++; | |
6949 s->src_node->bytes[dirndx] += pd.tot_len; | |
6950 } | |
6951 if (s->nat_src_node != NULL) { | |
6952 s->nat_src_node->packets[dirndx]++; | |
6953 s->nat_src_node->bytes[dirndx] += pd.tot_len; | |
6954 } | |
6955 dirndx = (dir == s->direction) ? 0 : 1; | |
6956 s->packets[dirndx]++; | |
6957 s->bytes[dirndx] += pd.tot_len; | |
6958 } | |
6959 tr = r; | |
6960 nr = (s != NULL) ? s->nat_rule.ptr : pd.nat_rule; | |
6961 if (nr != NULL && r == &V_pf_default_rule) | |
6962 tr = nr; | |
6963 if (tr->src.addr.type == PF_ADDR_TABLE) | |
6964 pfr_update_stats(tr->src.addr.p.tbl, | |
6965 (s == NULL) ? pd.src : | |
6966 &s->key[(s->direction == PF_IN)]->addr[0], | |
6967 pd.af, pd.tot_len, dir == PF_OUT, | |
6968 r->action == PF_PASS, tr->src.neg); | |
6969 if (tr->dst.addr.type == PF_ADDR_TABLE) | |
6970 pfr_update_stats(tr->dst.addr.p.tbl, | |
6971 (s == NULL) ? pd.dst : | |
6972 &s->key[(s->direction == PF_IN)]->addr[1], | |
6973 pd.af, pd.tot_len, dir == PF_OUT, | |
6974 r->action == PF_PASS, tr->dst.neg); | |
6975 } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment