[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[altq 1031] Re: ALTQ & fragmented packets




Paul Koster wrote:
> > Does ALTQ handle fragmented packets? In particular can it classify
> > fragmented packets of flows specified by (source IP, dest IP, proto,
> source
> > port, dest port) and (source IP, dest IP, IPsecProto, SPI) ? (Especially
> > because the port numbers and SPI is not present in the fragments.)

<snip>

> I removed the following check from ip4f_lookup and it seems to work. I
> haven't looked if this might has further implications for the cache
> structure so the author should look at this; a better solution might be to
> fill in the fp structure in ip4f_cache with this values and keep the check.
> ---
>      ip->ip_src.s_addr == fp->ip4f_info.fi_src.s_addr &&
>     ip->ip_dst.s_addr == fp->ip4f_info.fi_dst.s_addr &&
>     ip->ip_p == fp->ip4f_info.fi_proto
> ----
> 
> Paul

Thanks for the report and fix.  I guess I made a mistake when I ported
this part from ttt (a sniffer I wrote).

I committed the following fix.

--- altq_subr.c	2000/12/14 08:12:46	1.8
+++ altq_subr.c	2001/09/04 06:23:51
@@ -1263,6 +1263,9 @@
 
 	fp = ip4f_alloc();
 	fp->ip4f_id = ip->ip_id;
+	fp->ip4f_info.fi_proto = ip->ip_p;
+	fp->ip4f_info.fi_src.s_addr = ip->ip_src.s_addr;
+	fp->ip4f_info.fi_dst.s_addr = ip->ip_dst.s_addr;
 
 	/* save port numbers */
 	fp->ip4f_info.fi_sport = fin->fi_sport;

-Kenjiro