[Top] [All Lists]

Delayed use of ip_rcv

To: <netdev@xxxxxxxxxxx>
Subject: Delayed use of ip_rcv
From: Ramón Agüero <ramon@xxxxxxxxxxxxxxx>
Date: Mon, 28 Aug 2000 12:53:11 +0200
Sender: owner-netdev@xxxxxxxxxxx
    Hi all,
    I'm working in the development of a little module within Linux kernel 2.2.14, which deals with networking issues. One of the things I have to be able to do is retransmit packets after a certain delay. To do it I have done the following...
    1)    When I want to retransmit a certain packet, I copy the sk_buff. (the new sk_buff is stored in fwd)
    2)    The normal packet goes correctly to its destin....
    3)    Then I initialize a timer_list structure to manage the delayed transmission:
                a)    struct timer_list *timer; /* I reserve space for this structure */
                b)    init_timer(timer);
                c)    timer->expires=jiffies+5*HZ;
                d)    timer->function=rxmit;
                e)    timer->data="" long)fwd;
                f)    add_timer(timer);
    4)    Within the rxmit function what I do is the following..
                a)    struct sk_buff *fwd=(struct sk_buff *)data;            /* data is the parameter (unsigned long) that I pass to this function */
                b)    fwd->h.raw=fwd->data;
                c)    fwd->nh.raw=fwd->data;
                d)    ip_rcv(fwd,fwd->dev,NULL);
    The timer stuff works correctly (if I do not include the ip_rcv line) everithing goes all right (I can see my debug messages).. On the other hand, if I include the ip_rcv order just after the copying, not dealing with the delay it works fine, so I can't see what is the problem. Both things (the timer delay and the ip_rcv function) works fine by their own, but when I join them, the kernel crashes... (however, the ip datagram is received by the destin).
    I would be grateful if someone gives me a piece of help with this issue..
    Best regards...
PD.- Please I wish to be personally CC'ed the answers/comments posted to the list in response to my posting
<Prev in Thread] Current Thread [Next in Thread>
  • Delayed use of ip_rcv, Ramón Agüero <=