aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/netfilter/nfnetlink.h9
-rw-r--r--include/net/netfilter/nf_conntrack.h2
-rw-r--r--include/net/netfilter/nf_conntrack_expect.h4
-rw-r--r--net/netfilter/nf_conntrack_core.c8
-rw-r--r--net/netfilter/nf_conntrack_expect.c8
-rw-r--r--net/netfilter/nfnetlink.c13
6 files changed, 23 insertions, 21 deletions
diff --git a/include/linux/netfilter/nfnetlink.h b/include/linux/netfilter/nfnetlink.h
index ecbb8e495912..60b164171daf 100644
--- a/include/linux/netfilter/nfnetlink.h
+++ b/include/linux/netfilter/nfnetlink.h
@@ -29,10 +29,11 @@ extern int nfnetlink_subsys_register(const struct nfnetlink_subsystem *n);
29extern int nfnetlink_subsys_unregister(const struct nfnetlink_subsystem *n); 29extern int nfnetlink_subsys_unregister(const struct nfnetlink_subsystem *n);
30 30
31extern int nfnetlink_has_listeners(struct net *net, unsigned int group); 31extern int nfnetlink_has_listeners(struct net *net, unsigned int group);
32extern int nfnetlink_send(struct sk_buff *skb, struct net *net, u32 pid, unsigned int group, 32extern int nfnetlink_send(struct sk_buff *skb, struct net *net, u32 portid,
33 int echo, gfp_t flags); 33 unsigned int group, int echo, gfp_t flags);
34extern int nfnetlink_set_err(struct net *net, u32 pid, u32 group, int error); 34extern int nfnetlink_set_err(struct net *net, u32 portid, u32 group, int error);
35extern int nfnetlink_unicast(struct sk_buff *skb, struct net *net, u_int32_t pid, int flags); 35extern int nfnetlink_unicast(struct sk_buff *skb, struct net *net,
36 u32 portid, int flags);
36 37
37extern void nfnl_lock(__u8 subsys_id); 38extern void nfnl_lock(__u8 subsys_id);
38extern void nfnl_unlock(__u8 subsys_id); 39extern void nfnl_unlock(__u8 subsys_id);
diff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h
index caca0c4d6b4b..644d9c223d24 100644
--- a/include/net/netfilter/nf_conntrack.h
+++ b/include/net/netfilter/nf_conntrack.h
@@ -184,7 +184,7 @@ extern int nf_conntrack_hash_check_insert(struct nf_conn *ct);
184extern void nf_ct_delete_from_lists(struct nf_conn *ct); 184extern void nf_ct_delete_from_lists(struct nf_conn *ct);
185extern void nf_ct_dying_timeout(struct nf_conn *ct); 185extern void nf_ct_dying_timeout(struct nf_conn *ct);
186 186
187extern void nf_conntrack_flush_report(struct net *net, u32 pid, int report); 187extern void nf_conntrack_flush_report(struct net *net, u32 portid, int report);
188 188
189extern bool nf_ct_get_tuplepr(const struct sk_buff *skb, 189extern bool nf_ct_get_tuplepr(const struct sk_buff *skb,
190 unsigned int nhoff, u_int16_t l3num, 190 unsigned int nhoff, u_int16_t l3num,
diff --git a/include/net/netfilter/nf_conntrack_expect.h b/include/net/netfilter/nf_conntrack_expect.h
index cbbae7621e22..3f3aecbc8632 100644
--- a/include/net/netfilter/nf_conntrack_expect.h
+++ b/include/net/netfilter/nf_conntrack_expect.h
@@ -88,7 +88,7 @@ nf_ct_find_expectation(struct net *net, u16 zone,
88 const struct nf_conntrack_tuple *tuple); 88 const struct nf_conntrack_tuple *tuple);
89 89
90void nf_ct_unlink_expect_report(struct nf_conntrack_expect *exp, 90void nf_ct_unlink_expect_report(struct nf_conntrack_expect *exp,
91 u32 pid, int report); 91 u32 portid, int report);
92static inline void nf_ct_unlink_expect(struct nf_conntrack_expect *exp) 92static inline void nf_ct_unlink_expect(struct nf_conntrack_expect *exp)
93{ 93{
94 nf_ct_unlink_expect_report(exp, 0, 0); 94 nf_ct_unlink_expect_report(exp, 0, 0);
@@ -106,7 +106,7 @@ void nf_ct_expect_init(struct nf_conntrack_expect *, unsigned int, u_int8_t,
106 u_int8_t, const __be16 *, const __be16 *); 106 u_int8_t, const __be16 *, const __be16 *);
107void nf_ct_expect_put(struct nf_conntrack_expect *exp); 107void nf_ct_expect_put(struct nf_conntrack_expect *exp);
108int nf_ct_expect_related_report(struct nf_conntrack_expect *expect, 108int nf_ct_expect_related_report(struct nf_conntrack_expect *expect,
109 u32 pid, int report); 109 u32 portid, int report);
110static inline int nf_ct_expect_related(struct nf_conntrack_expect *expect) 110static inline int nf_ct_expect_related(struct nf_conntrack_expect *expect)
111{ 111{
112 return nf_ct_expect_related_report(expect, 0, 0); 112 return nf_ct_expect_related_report(expect, 0, 0);
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
index 007e8c43d19a..54ddc2f8e7c9 100644
--- a/net/netfilter/nf_conntrack_core.c
+++ b/net/netfilter/nf_conntrack_core.c
@@ -1260,7 +1260,7 @@ void nf_ct_iterate_cleanup(struct net *net,
1260EXPORT_SYMBOL_GPL(nf_ct_iterate_cleanup); 1260EXPORT_SYMBOL_GPL(nf_ct_iterate_cleanup);
1261 1261
1262struct __nf_ct_flush_report { 1262struct __nf_ct_flush_report {
1263 u32 pid; 1263 u32 portid;
1264 int report; 1264 int report;
1265}; 1265};
1266 1266
@@ -1275,7 +1275,7 @@ static int kill_report(struct nf_conn *i, void *data)
1275 1275
1276 /* If we fail to deliver the event, death_by_timeout() will retry */ 1276 /* If we fail to deliver the event, death_by_timeout() will retry */
1277 if (nf_conntrack_event_report(IPCT_DESTROY, i, 1277 if (nf_conntrack_event_report(IPCT_DESTROY, i,
1278 fr->pid, fr->report) < 0) 1278 fr->portid, fr->report) < 0)
1279 return 1; 1279 return 1;
1280 1280
1281 /* Avoid the delivery of the destroy event in death_by_timeout(). */ 1281 /* Avoid the delivery of the destroy event in death_by_timeout(). */
@@ -1298,10 +1298,10 @@ void nf_ct_free_hashtable(void *hash, unsigned int size)
1298} 1298}
1299EXPORT_SYMBOL_GPL(nf_ct_free_hashtable); 1299EXPORT_SYMBOL_GPL(nf_ct_free_hashtable);
1300 1300
1301void nf_conntrack_flush_report(struct net *net, u32 pid, int report) 1301void nf_conntrack_flush_report(struct net *net, u32 portid, int report)
1302{ 1302{
1303 struct __nf_ct_flush_report fr = { 1303 struct __nf_ct_flush_report fr = {
1304 .pid = pid, 1304 .portid = portid,
1305 .report = report, 1305 .report = report,
1306 }; 1306 };
1307 nf_ct_iterate_cleanup(net, kill_report, &fr); 1307 nf_ct_iterate_cleanup(net, kill_report, &fr);
diff --git a/net/netfilter/nf_conntrack_expect.c b/net/netfilter/nf_conntrack_expect.c
index 8c10e3db3d9b..0adfdcc68bae 100644
--- a/net/netfilter/nf_conntrack_expect.c
+++ b/net/netfilter/nf_conntrack_expect.c
@@ -40,7 +40,7 @@ static struct kmem_cache *nf_ct_expect_cachep __read_mostly;
40 40
41/* nf_conntrack_expect helper functions */ 41/* nf_conntrack_expect helper functions */
42void nf_ct_unlink_expect_report(struct nf_conntrack_expect *exp, 42void nf_ct_unlink_expect_report(struct nf_conntrack_expect *exp,
43 u32 pid, int report) 43 u32 portid, int report)
44{ 44{
45 struct nf_conn_help *master_help = nfct_help(exp->master); 45 struct nf_conn_help *master_help = nfct_help(exp->master);
46 struct net *net = nf_ct_exp_net(exp); 46 struct net *net = nf_ct_exp_net(exp);
@@ -54,7 +54,7 @@ void nf_ct_unlink_expect_report(struct nf_conntrack_expect *exp,
54 hlist_del(&exp->lnode); 54 hlist_del(&exp->lnode);
55 master_help->expecting[exp->class]--; 55 master_help->expecting[exp->class]--;
56 56
57 nf_ct_expect_event_report(IPEXP_DESTROY, exp, pid, report); 57 nf_ct_expect_event_report(IPEXP_DESTROY, exp, portid, report);
58 nf_ct_expect_put(exp); 58 nf_ct_expect_put(exp);
59 59
60 NF_CT_STAT_INC(net, expect_delete); 60 NF_CT_STAT_INC(net, expect_delete);
@@ -412,7 +412,7 @@ out:
412} 412}
413 413
414int nf_ct_expect_related_report(struct nf_conntrack_expect *expect, 414int nf_ct_expect_related_report(struct nf_conntrack_expect *expect,
415 u32 pid, int report) 415 u32 portid, int report)
416{ 416{
417 int ret; 417 int ret;
418 418
@@ -425,7 +425,7 @@ int nf_ct_expect_related_report(struct nf_conntrack_expect *expect,
425 if (ret < 0) 425 if (ret < 0)
426 goto out; 426 goto out;
427 spin_unlock_bh(&nf_conntrack_lock); 427 spin_unlock_bh(&nf_conntrack_lock);
428 nf_ct_expect_event_report(IPEXP_NEW, expect, pid, report); 428 nf_ct_expect_event_report(IPEXP_NEW, expect, portid, report);
429 return ret; 429 return ret;
430out: 430out:
431 spin_unlock_bh(&nf_conntrack_lock); 431 spin_unlock_bh(&nf_conntrack_lock);
diff --git a/net/netfilter/nfnetlink.c b/net/netfilter/nfnetlink.c
index bc4c499adb13..1640bd7dcdf4 100644
--- a/net/netfilter/nfnetlink.c
+++ b/net/netfilter/nfnetlink.c
@@ -112,22 +112,23 @@ int nfnetlink_has_listeners(struct net *net, unsigned int group)
112} 112}
113EXPORT_SYMBOL_GPL(nfnetlink_has_listeners); 113EXPORT_SYMBOL_GPL(nfnetlink_has_listeners);
114 114
115int nfnetlink_send(struct sk_buff *skb, struct net *net, u32 pid, 115int nfnetlink_send(struct sk_buff *skb, struct net *net, u32 portid,
116 unsigned int group, int echo, gfp_t flags) 116 unsigned int group, int echo, gfp_t flags)
117{ 117{
118 return nlmsg_notify(net->nfnl, skb, pid, group, echo, flags); 118 return nlmsg_notify(net->nfnl, skb, portid, group, echo, flags);
119} 119}
120EXPORT_SYMBOL_GPL(nfnetlink_send); 120EXPORT_SYMBOL_GPL(nfnetlink_send);
121 121
122int nfnetlink_set_err(struct net *net, u32 pid, u32 group, int error) 122int nfnetlink_set_err(struct net *net, u32 portid, u32 group, int error)
123{ 123{
124 return netlink_set_err(net->nfnl, pid, group, error); 124 return netlink_set_err(net->nfnl, portid, group, error);
125} 125}
126EXPORT_SYMBOL_GPL(nfnetlink_set_err); 126EXPORT_SYMBOL_GPL(nfnetlink_set_err);
127 127
128int nfnetlink_unicast(struct sk_buff *skb, struct net *net, u_int32_t pid, int flags) 128int nfnetlink_unicast(struct sk_buff *skb, struct net *net, u32 portid,
129 int flags)
129{ 130{
130 return netlink_unicast(net->nfnl, skb, pid, flags); 131 return netlink_unicast(net->nfnl, skb, portid, flags);
131} 132}
132EXPORT_SYMBOL_GPL(nfnetlink_unicast); 133EXPORT_SYMBOL_GPL(nfnetlink_unicast);
133 134