cregit-Linux how code gets into the kernel

Release 4.12 include/net/netfilter/nf_conntrack_zones.h

#ifndef _NF_CONNTRACK_ZONES_H

#define _NF_CONNTRACK_ZONES_H

#include <linux/netfilter/nf_conntrack_zones_common.h>

#if IS_ENABLED(CONFIG_NF_CONNTRACK)
#include <net/netfilter/nf_conntrack_extend.h>


static inline const struct nf_conntrack_zone * nf_ct_zone(const struct nf_conn *ct) { #ifdef CONFIG_NF_CONNTRACK_ZONES return &ct->zone; #else return &nf_ct_zone_dflt; #endif }

Contributors

PersonTokensPropCommitsCommitProp
Patrick McHardy1236.36%133.33%
Daniel Borkmann1236.36%133.33%
Florian Westphal927.27%133.33%
Total33100.00%3100.00%


static inline const struct nf_conntrack_zone * nf_ct_zone_init(struct nf_conntrack_zone *zone, u16 id, u8 dir, u8 flags) { zone->id = id; zone->flags = flags; zone->dir = dir; return zone; }

Contributors

PersonTokensPropCommitsCommitProp
Daniel Borkmann45100.00%2100.00%
Total45100.00%2100.00%


static inline const struct nf_conntrack_zone * nf_ct_zone_tmpl(const struct nf_conn *tmpl, const struct sk_buff *skb, struct nf_conntrack_zone *tmp) { #ifdef CONFIG_NF_CONNTRACK_ZONES if (!tmpl) return &nf_ct_zone_dflt; if (tmpl->zone.flags & NF_CT_FLAG_MARK) return nf_ct_zone_init(tmp, skb->mark, tmpl->zone.dir, 0); #endif return nf_ct_zone(tmpl); }

Contributors

PersonTokensPropCommitsCommitProp
Daniel Borkmann5877.33%266.67%
Florian Westphal1722.67%133.33%
Total75100.00%3100.00%


static inline void nf_ct_zone_add(struct nf_conn *ct, const struct nf_conntrack_zone *zone) { #ifdef CONFIG_NF_CONNTRACK_ZONES ct->zone = *zone; #endif }

Contributors

PersonTokensPropCommitsCommitProp
Daniel Borkmann2480.00%266.67%
Florian Westphal620.00%133.33%
Total30100.00%3100.00%


static inline bool nf_ct_zone_matches_dir(const struct nf_conntrack_zone *zone, enum ip_conntrack_dir dir) { return zone->dir & (1 << dir); }

Contributors

PersonTokensPropCommitsCommitProp
Daniel Borkmann28100.00%1100.00%
Total28100.00%1100.00%


static inline u16 nf_ct_zone_id(const struct nf_conntrack_zone *zone, enum ip_conntrack_dir dir) { #ifdef CONFIG_NF_CONNTRACK_ZONES return nf_ct_zone_matches_dir(zone, dir) ? zone->id : NF_CT_DEFAULT_ZONE_ID; #else return NF_CT_DEFAULT_ZONE_ID; #endif }

Contributors

PersonTokensPropCommitsCommitProp
Daniel Borkmann3175.61%150.00%
Florian Westphal1024.39%150.00%
Total41100.00%2100.00%


static inline bool nf_ct_zone_equal(const struct nf_conn *a, const struct nf_conntrack_zone *b, enum ip_conntrack_dir dir) { #ifdef CONFIG_NF_CONNTRACK_ZONES return nf_ct_zone_id(nf_ct_zone(a), dir) == nf_ct_zone_id(b, dir); #else return true; #endif }

Contributors

PersonTokensPropCommitsCommitProp
Daniel Borkmann4180.39%266.67%
Florian Westphal1019.61%133.33%
Total51100.00%3100.00%


static inline bool nf_ct_zone_equal_any(const struct nf_conn *a, const struct nf_conntrack_zone *b) { #ifdef CONFIG_NF_CONNTRACK_ZONES return nf_ct_zone(a)->id == b->id; #else return true; #endif }

Contributors

PersonTokensPropCommitsCommitProp
Daniel Borkmann2868.29%250.00%
Florian Westphal1024.39%125.00%
Patrick McHardy37.32%125.00%
Total41100.00%4100.00%

#endif /* IS_ENABLED(CONFIG_NF_CONNTRACK) */ #endif /* _NF_CONNTRACK_ZONES_H */

Overall Contributors

PersonTokensPropCommitsCommitProp
Daniel Borkmann27273.91%450.00%
Florian Westphal6216.85%225.00%
Patrick McHardy349.24%225.00%
Total368100.00%8100.00%
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.