diff options
Diffstat (limited to 'net/xfrm/xfrm_state.c')
-rw-r--r-- | net/xfrm/xfrm_state.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c index 87cd0e4d428..3459692092e 100644 --- a/net/xfrm/xfrm_state.c +++ b/net/xfrm/xfrm_state.c | |||
@@ -166,7 +166,7 @@ static DEFINE_SPINLOCK(xfrm_state_gc_lock); | |||
166 | int __xfrm_state_delete(struct xfrm_state *x); | 166 | int __xfrm_state_delete(struct xfrm_state *x); |
167 | 167 | ||
168 | int km_query(struct xfrm_state *x, struct xfrm_tmpl *t, struct xfrm_policy *pol); | 168 | int km_query(struct xfrm_state *x, struct xfrm_tmpl *t, struct xfrm_policy *pol); |
169 | void km_state_expired(struct xfrm_state *x, int hard, u32 pid); | 169 | void km_state_expired(struct xfrm_state *x, int hard, u32 portid); |
170 | 170 | ||
171 | static struct xfrm_state_afinfo *xfrm_state_lock_afinfo(unsigned int family) | 171 | static struct xfrm_state_afinfo *xfrm_state_lock_afinfo(unsigned int family) |
172 | { | 172 | { |
@@ -1674,13 +1674,13 @@ void km_state_notify(struct xfrm_state *x, const struct km_event *c) | |||
1674 | EXPORT_SYMBOL(km_policy_notify); | 1674 | EXPORT_SYMBOL(km_policy_notify); |
1675 | EXPORT_SYMBOL(km_state_notify); | 1675 | EXPORT_SYMBOL(km_state_notify); |
1676 | 1676 | ||
1677 | void km_state_expired(struct xfrm_state *x, int hard, u32 pid) | 1677 | void km_state_expired(struct xfrm_state *x, int hard, u32 portid) |
1678 | { | 1678 | { |
1679 | struct net *net = xs_net(x); | 1679 | struct net *net = xs_net(x); |
1680 | struct km_event c; | 1680 | struct km_event c; |
1681 | 1681 | ||
1682 | c.data.hard = hard; | 1682 | c.data.hard = hard; |
1683 | c.pid = pid; | 1683 | c.portid = portid; |
1684 | c.event = XFRM_MSG_EXPIRE; | 1684 | c.event = XFRM_MSG_EXPIRE; |
1685 | km_state_notify(x, &c); | 1685 | km_state_notify(x, &c); |
1686 | 1686 | ||
@@ -1700,7 +1700,7 @@ int km_query(struct xfrm_state *x, struct xfrm_tmpl *t, struct xfrm_policy *pol) | |||
1700 | 1700 | ||
1701 | read_lock(&xfrm_km_lock); | 1701 | read_lock(&xfrm_km_lock); |
1702 | list_for_each_entry(km, &xfrm_km_list, list) { | 1702 | list_for_each_entry(km, &xfrm_km_list, list) { |
1703 | acqret = km->acquire(x, t, pol, XFRM_POLICY_OUT); | 1703 | acqret = km->acquire(x, t, pol); |
1704 | if (!acqret) | 1704 | if (!acqret) |
1705 | err = acqret; | 1705 | err = acqret; |
1706 | } | 1706 | } |
@@ -1726,13 +1726,13 @@ int km_new_mapping(struct xfrm_state *x, xfrm_address_t *ipaddr, __be16 sport) | |||
1726 | } | 1726 | } |
1727 | EXPORT_SYMBOL(km_new_mapping); | 1727 | EXPORT_SYMBOL(km_new_mapping); |
1728 | 1728 | ||
1729 | void km_policy_expired(struct xfrm_policy *pol, int dir, int hard, u32 pid) | 1729 | void km_policy_expired(struct xfrm_policy *pol, int dir, int hard, u32 portid) |
1730 | { | 1730 | { |
1731 | struct net *net = xp_net(pol); | 1731 | struct net *net = xp_net(pol); |
1732 | struct km_event c; | 1732 | struct km_event c; |
1733 | 1733 | ||
1734 | c.data.hard = hard; | 1734 | c.data.hard = hard; |
1735 | c.pid = pid; | 1735 | c.portid = portid; |
1736 | c.event = XFRM_MSG_POLEXPIRE; | 1736 | c.event = XFRM_MSG_POLEXPIRE; |
1737 | km_policy_notify(pol, dir, &c); | 1737 | km_policy_notify(pol, dir, &c); |
1738 | 1738 | ||
@@ -1994,8 +1994,10 @@ int __xfrm_init_state(struct xfrm_state *x, bool init_replay) | |||
1994 | goto error; | 1994 | goto error; |
1995 | 1995 | ||
1996 | x->outer_mode = xfrm_get_mode(x->props.mode, family); | 1996 | x->outer_mode = xfrm_get_mode(x->props.mode, family); |
1997 | if (x->outer_mode == NULL) | 1997 | if (x->outer_mode == NULL) { |
1998 | err = -EPROTONOSUPPORT; | ||
1998 | goto error; | 1999 | goto error; |
2000 | } | ||
1999 | 2001 | ||
2000 | if (init_replay) { | 2002 | if (init_replay) { |
2001 | err = xfrm_init_replay(x); | 2003 | err = xfrm_init_replay(x); |
@@ -2058,7 +2060,7 @@ void xfrm_state_fini(struct net *net) | |||
2058 | unsigned int sz; | 2060 | unsigned int sz; |
2059 | 2061 | ||
2060 | flush_work(&net->xfrm.state_hash_work); | 2062 | flush_work(&net->xfrm.state_hash_work); |
2061 | audit_info.loginuid = -1; | 2063 | audit_info.loginuid = INVALID_UID; |
2062 | audit_info.sessionid = -1; | 2064 | audit_info.sessionid = -1; |
2063 | audit_info.secid = 0; | 2065 | audit_info.secid = 0; |
2064 | xfrm_state_flush(net, IPSEC_PROTO_ANY, &audit_info); | 2066 | xfrm_state_flush(net, IPSEC_PROTO_ANY, &audit_info); |
@@ -2125,7 +2127,7 @@ static void xfrm_audit_helper_pktinfo(struct sk_buff *skb, u16 family, | |||
2125 | } | 2127 | } |
2126 | 2128 | ||
2127 | void xfrm_audit_state_add(struct xfrm_state *x, int result, | 2129 | void xfrm_audit_state_add(struct xfrm_state *x, int result, |
2128 | uid_t auid, u32 sessionid, u32 secid) | 2130 | kuid_t auid, u32 sessionid, u32 secid) |
2129 | { | 2131 | { |
2130 | struct audit_buffer *audit_buf; | 2132 | struct audit_buffer *audit_buf; |
2131 | 2133 | ||
@@ -2140,7 +2142,7 @@ void xfrm_audit_state_add(struct xfrm_state *x, int result, | |||
2140 | EXPORT_SYMBOL_GPL(xfrm_audit_state_add); | 2142 | EXPORT_SYMBOL_GPL(xfrm_audit_state_add); |
2141 | 2143 | ||
2142 | void xfrm_audit_state_delete(struct xfrm_state *x, int result, | 2144 | void xfrm_audit_state_delete(struct xfrm_state *x, int result, |
2143 | uid_t auid, u32 sessionid, u32 secid) | 2145 | kuid_t auid, u32 sessionid, u32 secid) |
2144 | { | 2146 | { |
2145 | struct audit_buffer *audit_buf; | 2147 | struct audit_buffer *audit_buf; |
2146 | 2148 | ||