Revert "xfrm: notify default policy on update"
This reverts commit9856c3a129which is88d0adb5f1commit upstream. It breaks the Android kernel ABI and if this really needs to be added to Android, it must come back in a format in the future that does not break the abi. Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: I4e7bf3d512309e061272648fdb5733e270ab4279
This commit is contained in:
parent
4ead88c0e8
commit
df0ff8d194
1 changed files with 0 additions and 31 deletions
|
|
@ -1901,36 +1901,6 @@ static struct sk_buff *xfrm_policy_netlink(struct sk_buff *in_skb,
|
|||
return skb;
|
||||
}
|
||||
|
||||
static int xfrm_notify_userpolicy(struct net *net)
|
||||
{
|
||||
struct xfrm_userpolicy_default *up;
|
||||
int len = NLMSG_ALIGN(sizeof(*up));
|
||||
struct nlmsghdr *nlh;
|
||||
struct sk_buff *skb;
|
||||
|
||||
skb = nlmsg_new(len, GFP_ATOMIC);
|
||||
if (skb == NULL)
|
||||
return -ENOMEM;
|
||||
|
||||
nlh = nlmsg_put(skb, 0, 0, XFRM_MSG_GETDEFAULT, sizeof(*up), 0);
|
||||
if (nlh == NULL) {
|
||||
kfree_skb(skb);
|
||||
return -EMSGSIZE;
|
||||
}
|
||||
|
||||
up = nlmsg_data(nlh);
|
||||
up->in = net->xfrm.policy_default & XFRM_POL_DEFAULT_IN ?
|
||||
XFRM_USERPOLICY_BLOCK : XFRM_USERPOLICY_ACCEPT;
|
||||
up->fwd = net->xfrm.policy_default & XFRM_POL_DEFAULT_FWD ?
|
||||
XFRM_USERPOLICY_BLOCK : XFRM_USERPOLICY_ACCEPT;
|
||||
up->out = net->xfrm.policy_default & XFRM_POL_DEFAULT_OUT ?
|
||||
XFRM_USERPOLICY_BLOCK : XFRM_USERPOLICY_ACCEPT;
|
||||
|
||||
nlmsg_end(skb, nlh);
|
||||
|
||||
return xfrm_nlmsg_multicast(net, skb, 0, XFRMNLGRP_POLICY);
|
||||
}
|
||||
|
||||
static int xfrm_set_default(struct sk_buff *skb, struct nlmsghdr *nlh,
|
||||
struct nlattr **attrs)
|
||||
{
|
||||
|
|
@ -1954,7 +1924,6 @@ static int xfrm_set_default(struct sk_buff *skb, struct nlmsghdr *nlh,
|
|||
|
||||
rt_genid_bump_all(net);
|
||||
|
||||
xfrm_notify_userpolicy(net);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue