inet: add RCU protection to inet->opt
[deliverable/linux.git] / net / ipv4 / syncookies.c
index 71e029691908d6bab909115ff023d30f86015d9b..26461492a847d863bd873cc423a7ee13e6ec95a0 100644 (file)
@@ -321,10 +321,10 @@ struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb,
         * the ACK carries the same options again (see RFC1122 4.2.3.8)
         */
        if (opt && opt->optlen) {
-               int opt_size = sizeof(struct ip_options) + opt->optlen;
+               int opt_size = sizeof(struct ip_options_rcu) + opt->optlen;
 
                ireq->opt = kmalloc(opt_size, GFP_ATOMIC);
-               if (ireq->opt != NULL && ip_options_echo(ireq->opt, skb)) {
+               if (ireq->opt != NULL && ip_options_echo(&ireq->opt->opt, skb)) {
                        kfree(ireq->opt);
                        ireq->opt = NULL;
                }
This page took 0.024669 seconds and 5 git commands to generate.