netlink: Rename pid to portid to avoid confusion
It is a frequent mistake to confuse the netlink port identifier with a process identifier. Try to reduce this confusion by renaming fields that hold port identifiers portid instead of pid. I have carefully avoided changing the structures exported to userspace to avoid changing the userspace API. I have successfully built an allyesconfig kernel with this change. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Acked-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
9f00d9776b
commit
15e473046c
@@ -166,7 +166,7 @@ static DEFINE_SPINLOCK(xfrm_state_gc_lock);
|
||||
int __xfrm_state_delete(struct xfrm_state *x);
|
||||
|
||||
int km_query(struct xfrm_state *x, struct xfrm_tmpl *t, struct xfrm_policy *pol);
|
||||
void km_state_expired(struct xfrm_state *x, int hard, u32 pid);
|
||||
void km_state_expired(struct xfrm_state *x, int hard, u32 portid);
|
||||
|
||||
static struct xfrm_state_afinfo *xfrm_state_lock_afinfo(unsigned int family)
|
||||
{
|
||||
@@ -1674,13 +1674,13 @@ void km_state_notify(struct xfrm_state *x, const struct km_event *c)
|
||||
EXPORT_SYMBOL(km_policy_notify);
|
||||
EXPORT_SYMBOL(km_state_notify);
|
||||
|
||||
void km_state_expired(struct xfrm_state *x, int hard, u32 pid)
|
||||
void km_state_expired(struct xfrm_state *x, int hard, u32 portid)
|
||||
{
|
||||
struct net *net = xs_net(x);
|
||||
struct km_event c;
|
||||
|
||||
c.data.hard = hard;
|
||||
c.pid = pid;
|
||||
c.portid = portid;
|
||||
c.event = XFRM_MSG_EXPIRE;
|
||||
km_state_notify(x, &c);
|
||||
|
||||
@@ -1726,13 +1726,13 @@ int km_new_mapping(struct xfrm_state *x, xfrm_address_t *ipaddr, __be16 sport)
|
||||
}
|
||||
EXPORT_SYMBOL(km_new_mapping);
|
||||
|
||||
void km_policy_expired(struct xfrm_policy *pol, int dir, int hard, u32 pid)
|
||||
void km_policy_expired(struct xfrm_policy *pol, int dir, int hard, u32 portid)
|
||||
{
|
||||
struct net *net = xp_net(pol);
|
||||
struct km_event c;
|
||||
|
||||
c.data.hard = hard;
|
||||
c.pid = pid;
|
||||
c.portid = portid;
|
||||
c.event = XFRM_MSG_POLEXPIRE;
|
||||
km_policy_notify(pol, dir, &c);
|
||||
|
||||
|
Reference in New Issue
Block a user