Committed with trivial formatting change. Thank you!

17.10.2016 08:30, Sakar Arora пишет:
> Hi
> 
> Sending the below mentioned patch as an attachment. Please review.
> 
> Thanks,
> Sakar
> 
> -----Original Message-----
> From: Sakar Arora [mailto:sakar.ar...@nxp.com] 
> Sent: Saturday, October 15, 2016 1:26 AM
> To: grub-devel@gnu.org
> Cc: Bhupesh Sharma <bhupesh.sha...@nxp.com>; Sakar Arora <sakar.ar...@nxp.com>
> Subject: [PATCH] net/ip: Fix limit_time calculation in freeing old fragments
> 
> From: Sakar Arora <sakar.ar...@nxp.com>
> 
> limit_time underflows when current time is less than 90000ms.
> This causes packet fragments received during this time, i.e., till 90000ms 
> pass since timer init, to be rejected.
> 
> Hence, set it to 0 if its less than 90000.
> 
> Signed-off-by: Sakar Arora <sakar.ar...@nxp.com>
> ---
>  grub-core/net/ip.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/grub-core/net/ip.c b/grub-core/net/ip.c index 8c56baa..4dae207 
> 100644
> --- a/grub-core/net/ip.c
> +++ b/grub-core/net/ip.c
> @@ -363,7 +363,9 @@ static void
>  free_old_fragments (void)
>  {
>    struct reassemble *rsm, **prev;
> -  grub_uint64_t limit_time = grub_get_time_ms () - 90000;
> +  grub_uint64_t limit_time = grub_get_time_ms ();
> +
> +  limit_time = (limit_time > 90000)?limit_time - 90000:0;
>  
>    for (prev = &reassembles, rsm = *prev; rsm; rsm = *prev)
>      if (rsm->last_time < limit_time)
> --
> 1.9.1
> 
> 
> 
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
> 


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to