[Barrelfish-users] net_queue_manager:frag.c patch

Kornilios Kourtis kornilios.kourtis at inf.ethz.ch
Wed Mar 13 15:58:17 CET 2013


Hi Mateusz,

On Tue, Mar 12, 2013 at 06:45:00PM +0100, Mateusz Olczak wrote:
> Hello,
> 
> Some de-fragmented packets may cause the ethernet server will crash.
> I suggest attached patch as fix.
> 
> to recreate segfault:
> ping barrelfish.host -s 1473

Thanks for the patch! I've pushed it in our tree, so it's going to be a
part of next relase.

cheers,
Kornilios.

> 
> Kind Regards,
> // Mateusz 
> 

> diff -rupN src/lib/net_queue_manager/frag.c src.fragc/lib/net_queue_manager/frag.c
> --- src/lib/net_queue_manager/frag.c	2013-03-12 17:02:59.842455019 +0100
> +++ src.fragc/lib/net_queue_manager/frag.c	2013-03-12 17:33:36.275561400 +0100
> @@ -219,14 +219,16 @@ bool handle_fragmented_packet(void *pack
>  
>      if (is_fragmented(packet, len)) {
>          if (has_headers(packet, len)) {
> +            struct filter *ret_filter;
>              E_IPFRAG_DEBUG("IP_FRAG: first fragment %lu\n", ip_id);
> -            buffer = execute_filters(packet, len)->buffer;
> -            if (buffer == NULL) {
> +            ret_filter = execute_filters(packet, len);
> +            if (ret_filter == NULL || ret_filter->buffer == NULL) {
>                  E_IPFRAG_DEBUG("IP_FRAG: ERROR: issues with filter %lu\n",
>                                 ip_id);
>                  return true;    // we do not want to process this packet anymore
>              }
>  
> +            buffer = ret_filter->buffer;
>              add_fragment_filter(ip_id, buffer);
>              if (copy_packet_to_user(buffer, packet, len)) {
>  //                              send_packet_received_notification(buffer);

> _______________________________________________
> Barrelfish-users mailing list
> Barrelfish-users at lists.inf.ethz.ch
> https://lists.inf.ethz.ch/mailman/listinfo/barrelfish-users


-- 
Kornilios Kourtis



More information about the Barrelfish-users mailing list