mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-04 09:59:32 +00:00
ipvs: Hoist computation of ipvs earlier in sctp_conn_schedule
The addition of sysctl_sloppy_sctp in sctp_conn_schedule resulted in a use of ipvs before it was computed. Hoist the computation of ipvs earlier to avoid this problem. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Acked-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: Simon Horman <horms@verge.net.au>
This commit is contained in:
parent
227b9e8708
commit
1daea8ed16
1 changed files with 3 additions and 2 deletions
|
@ -20,6 +20,9 @@ sctp_conn_schedule(int af, struct sk_buff *skb, struct ip_vs_proto_data *pd,
|
|||
sctp_sctphdr_t *sh, _sctph;
|
||||
__be16 _ports[2], *ports = NULL;
|
||||
|
||||
net = skb_net(skb);
|
||||
ipvs = net_ipvs(net);
|
||||
|
||||
if (likely(!ip_vs_iph_icmp(iph))) {
|
||||
sh = skb_header_pointer(skb, iph->len, sizeof(_sctph), &_sctph);
|
||||
if (sh) {
|
||||
|
@ -40,8 +43,6 @@ sctp_conn_schedule(int af, struct sk_buff *skb, struct ip_vs_proto_data *pd,
|
|||
return 0;
|
||||
}
|
||||
|
||||
net = skb_net(skb);
|
||||
ipvs = net_ipvs(net);
|
||||
rcu_read_lock();
|
||||
if (likely(!ip_vs_iph_inverse(iph)))
|
||||
svc = ip_vs_service_find(net, af, skb->mark, iph->protocol,
|
||||
|
|
Loading…
Reference in a new issue