aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2013-04-17 02:47:08 -0400
committerDavid S. Miller <davem@davemloft.net>2013-04-19 14:58:36 -0400
commitec464e5dc504a164c5dbff4a06812d495e44e34d (patch)
tree65ae126d17ef24af8881bf43def9a9885ea440ae /net
parent5683264c3981047aa93eebabcdbb81676018a7c9 (diff)
netfilter: rename netlink related "pid" variables to "portid"
Get rid of the confusing mix of pid and portid and use portid consistently for all netlink related socket identities. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-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
3 files changed, 15 insertions, 14 deletions
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