Re : Re : Re : Bug in using inet_lookup ()

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Nj A
Date: Thursday, November 15, 2007 - 9:29 am

Hello all,
No bugs are due to the inet_lookup call now using the following:
      if ((s_skb = alloc_skb (MAX_TCP_HEADER + 15, GFP_ATOMIC)) == NULL)
      {
         printk ("%s: Unable to allocate memory \n", __FUNCTION__);
         err = -ENOMEM;
      }
      dev = s_skb->dev;

      if (!dev)
         printk ("%s: no device attached to s_skb\n", __FUNCTION__);
         goto process_dev;

      sk = inet_lookup (&tcp_hashinfo, src, p_src, dst, p_dst, inet_iif (s_skb));

      bh_lock_sock (sk);
    process_dev:
      spin_lock (&tmp_lock);
      new_dev = list_entry (&tmp, struct net_device, todo_list);
      spin_unlock (&tmp_lock);
      if (!new_dev)
         printk ("%s: no device attached to new_dev \n", __FUNCTION__);
      s_skb->dev = new_dev;

  ...
  bh_unlock_sock (sk);
  ...

However, I am not having the right results. I checked with an established socket and expected to see that the socket is established (which is the case) but got the wrong state when testing on (sk->sk_state) and the socket seems in the TIME_WAIT / CLOSE state.

May be I am corrupting the search by manually attaching a device to the skb?
Any idea please?

Cheers,

----- Message d'origine ----


      _____________________________________________________________________________ 
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail 
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re : Re : Re : Bug in using inet_lookup (), Nj A, (Thu Nov 15, 9:29 am)
Re: Re : Re : Re : Bug in using inet_lookup (), Evgeniy Polyakov, (Thu Nov 15, 9:45 am)