diff options
author | Michael Brown <mcb30@ipxe.org> | 2010-09-02 03:34:04 +0100 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2010-09-03 21:28:43 +0100 |
commit | 28934eef81b3c7a494b12cb87804098041d64659 (patch) | |
tree | da46f478f9977bca4c06f5e71dc37a0066948237 /src/net/ipv4.c | |
parent | 25447294d551bb93f63dd7e43e19b65e7c89e4db (diff) | |
download | ipxe-28934eef81b3c7a494b12cb87804098041d64659.tar.gz |
[retry] Hold reference while timer is running and during expiry callback
Guarantee that a retry timer cannot go out of scope while the timer is
running, and provide a guarantee to the expiry callback that the timer
will remain in scope during the entire callback (similar to the
guarantee provided to interface methods).
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/net/ipv4.c')
-rw-r--r-- | src/net/ipv4.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/net/ipv4.c b/src/net/ipv4.c index a3cbdb03..5918bbec 100644 --- a/src/net/ipv4.c +++ b/src/net/ipv4.c @@ -222,7 +222,7 @@ static struct io_buffer * ipv4_reassemble ( struct io_buffer * iobuf ) { free_iob ( iobuf ); /* Set the reassembly timer */ - timer_init ( &fragbuf->frag_timer, ipv4_frag_expired ); + timer_init ( &fragbuf->frag_timer, ipv4_frag_expired, NULL ); start_timer_fixed ( &fragbuf->frag_timer, IP_FRAG_TIMEOUT ); /* Add the fragment buffer to the list of fragment buffers */ |