Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Merge in networking bug fixes for merge window. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -64,6 +64,7 @@ static struct sctp_association *sctp_association_init(
|
||||
/* Discarding const is appropriate here. */
|
||||
asoc->ep = (struct sctp_endpoint *)ep;
|
||||
asoc->base.sk = (struct sock *)sk;
|
||||
asoc->base.net = sock_net(sk);
|
||||
|
||||
sctp_endpoint_hold(asoc->ep);
|
||||
sock_hold(asoc->base.sk);
|
||||
|
@@ -110,6 +110,7 @@ static struct sctp_endpoint *sctp_endpoint_init(struct sctp_endpoint *ep,
|
||||
|
||||
/* Remember who we are attached to. */
|
||||
ep->base.sk = sk;
|
||||
ep->base.net = sock_net(sk);
|
||||
sock_hold(ep->base.sk);
|
||||
|
||||
return ep;
|
||||
|
@@ -882,7 +882,7 @@ static inline int sctp_hash_cmp(struct rhashtable_compare_arg *arg,
|
||||
if (!sctp_transport_hold(t))
|
||||
return err;
|
||||
|
||||
if (!net_eq(sock_net(t->asoc->base.sk), x->net))
|
||||
if (!net_eq(t->asoc->base.net, x->net))
|
||||
goto out;
|
||||
if (x->lport != htons(t->asoc->base.bind_addr.port))
|
||||
goto out;
|
||||
@@ -897,7 +897,7 @@ static inline __u32 sctp_hash_obj(const void *data, u32 len, u32 seed)
|
||||
{
|
||||
const struct sctp_transport *t = data;
|
||||
|
||||
return sctp_hashfn(sock_net(t->asoc->base.sk),
|
||||
return sctp_hashfn(t->asoc->base.net,
|
||||
htons(t->asoc->base.bind_addr.port),
|
||||
&t->ipaddr, seed);
|
||||
}
|
||||
|
@@ -2160,8 +2160,10 @@ enum sctp_disposition sctp_sf_do_5_2_4_dupcook(
|
||||
|
||||
/* Update socket peer label if first association. */
|
||||
if (security_sctp_assoc_request((struct sctp_endpoint *)ep,
|
||||
chunk->skb))
|
||||
chunk->skb)) {
|
||||
sctp_association_free(new_asoc);
|
||||
return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands);
|
||||
}
|
||||
|
||||
/* Set temp so that it won't be added into hashtable */
|
||||
new_asoc->temp = 1;
|
||||
|
Reference in New Issue
Block a user