sctp: Make the association hashtable handle multiple network namespaces
- Use struct net in the hash calculation - Use sock_net(association.base.sk) in the association lookups. - On receive calculate the network namespace from skb->dev. - Pass struct net from receive down to the functions that actually do the association lookup. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Acked-by: Vlad Yasevich <vyasevich@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
4cdadcbcb6
commit
4110cc255d
@@ -1427,7 +1427,7 @@ int sctp_endpoint_is_peeled_off(struct sctp_endpoint *,
|
||||
const union sctp_addr *);
|
||||
struct sctp_endpoint *sctp_endpoint_is_match(struct sctp_endpoint *,
|
||||
struct net *, const union sctp_addr *);
|
||||
int sctp_has_association(const union sctp_addr *laddr,
|
||||
int sctp_has_association(struct net *net, const union sctp_addr *laddr,
|
||||
const union sctp_addr *paddr);
|
||||
|
||||
int sctp_verify_init(const struct sctp_association *asoc, sctp_cid_t,
|
||||
@@ -2014,6 +2014,7 @@ void sctp_assoc_control_transport(struct sctp_association *,
|
||||
sctp_transport_cmd_t, sctp_sn_error_t);
|
||||
struct sctp_transport *sctp_assoc_lookup_tsn(struct sctp_association *, __u32);
|
||||
struct sctp_transport *sctp_assoc_is_match(struct sctp_association *,
|
||||
struct net *,
|
||||
const union sctp_addr *,
|
||||
const union sctp_addr *);
|
||||
void sctp_assoc_migrate(struct sctp_association *, struct sock *);
|
||||
|
Reference in New Issue
Block a user