From 13186b64b6c3d5cbe9ed13bda1532e79b1afe81d Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Sat, 16 Jul 2011 01:15:53 +0100 Subject: [ipv4] Fix fragment reassembly Signed-off-by: Michael Brown --- src/include/ipxe/ip.h | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) (limited to 'src/include') diff --git a/src/include/ipxe/ip.h b/src/include/ipxe/ip.h index 3f3dc1f77..4366d9ab3 100644 --- a/src/include/ipxe/ip.h +++ b/src/include/ipxe/ip.h @@ -31,9 +31,6 @@ struct io_buffer; #define IP_TOS 0 #define IP_TTL 64 -#define IP_FRAG_IOB_SIZE 1500 -#define IP_FRAG_TIMEOUT 50 - /** An IPv4 packet header */ struct iphdr { uint8_t verhdrlen; @@ -73,20 +70,16 @@ struct ipv4_miniroute { struct in_addr gateway; }; -/* Fragment reassembly buffer */ -struct frag_buffer { - /* Identification number */ - uint16_t ident; - /* Source network address */ - struct in_addr src; - /* Destination network address */ - struct in_addr dest; - /* Reassembled I/O buffer */ - struct io_buffer *frag_iob; - /* Reassembly timer */ - struct retry_timer frag_timer; +/* IPv4 fragment reassembly buffer */ +struct ipv4_fragment { /* List of fragment reassembly buffers */ struct list_head list; + /** Reassembled packet */ + struct io_buffer *iobuf; + /** Current offset */ + size_t offset; + /** Reassembly timer */ + struct retry_timer timer; }; extern struct list_head ipv4_miniroutes; -- cgit v1.2.3-55-g7522