Commit 290fdc70 authored by David S. Miller's avatar David S. Miller

Merge bk://kernel.bkbits.net/acme/sock-2.5

into nuts.ninka.net:/home/davem/src/BK/net-2.5
parents b34b4482 3ee81afa
......@@ -682,8 +682,10 @@ static int ppp_ioctl(struct inode *inode, struct file *file,
if (code == 0)
break;
err = -EFAULT;
if (copy_from_user(code, uprog.filter, len))
if (copy_from_user(code, uprog.filter, len)) {
kfree(code);
break;
}
err = sk_chk_filter(code, uprog.len);
if (err) {
kfree(code);
......
......@@ -44,7 +44,7 @@ struct xfrm_selector
uid_t user;
};
#define XFRM_INF (~(u64)0)
#define XFRM_INF (~(__u64)0)
struct xfrm_lifetime_cfg
{
......@@ -164,7 +164,7 @@ struct xfrm_usersa_info {
};
struct xfrm_usersa_id {
xfrm_address_t saddr;
xfrm_address_t daddr;
__u32 spi;
__u16 family;
__u8 proto;
......
......@@ -280,7 +280,6 @@ int xfrm_policy_insert(int dir, struct xfrm_policy *policy, int excl)
write_unlock_bh(&xfrm_policy_lock);
if (delpol) {
atomic_dec(&delpol->refcnt);
xfrm_policy_kill(delpol);
xfrm_pol_put(delpol);
}
......
......@@ -260,7 +260,7 @@ static int xfrm_add_sa(struct sk_buff *skb, struct nlmsghdr *nlh, void **xfrma)
if (!x)
return err;
x1 = xfrm_state_lookup(&x->props.saddr, x->id.spi, x->id.proto, x->props.family);
x1 = xfrm_state_lookup(&x->id.daddr, x->id.spi, x->id.proto, x->props.family);
if (x1) {
xfrm_state_put(x);
xfrm_state_put(x1);
......@@ -277,7 +277,7 @@ static int xfrm_del_sa(struct sk_buff *skb, struct nlmsghdr *nlh, void **xfrma)
struct xfrm_state *x;
struct xfrm_usersa_id *p = NLMSG_DATA(nlh);
x = xfrm_state_lookup(&p->saddr, p->spi, p->proto, p->family);
x = xfrm_state_lookup(&p->daddr, p->spi, p->proto, p->family);
if (x == NULL)
return -ESRCH;
......@@ -403,7 +403,7 @@ static int xfrm_get_sa(struct sk_buff *skb, struct nlmsghdr *nlh, void **xfrma)
struct sk_buff *resp_skb;
int err;
x = xfrm_state_lookup(&p->saddr, p->spi, p->proto, p->family);
x = xfrm_state_lookup(&p->daddr, p->spi, p->proto, p->family);
err = -ESRCH;
if (x == NULL)
goto out_noput;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment