net/ip: Fix limit_time calculation in freeing old fragments
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi
Sending the below mentioned patch as an attachment. Please review.
Thanks,
Sakar
-----Original Message-----
From: Sakar Arora [mailto:[email protected]]
Sent: Saturday, October 15, 2016 1:26 AM
To: [email protected]
Cc: Bhupesh Sharma <[email protected]>; Sakar Arora <[email protected]>
Subject: [PATCH] net/ip: Fix limit_time calculation in freeing old fragments
From: Sakar Arora <[email protected]>
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.
--- grub-core/net/ip.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
grub-core/net/ip.c +3 -1
@@ -363,7 +363,9 @@ static voidfree_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
From 2b2310b811a5b84f06bb3fc9dc014c54ff103311 Mon Sep 17 00:00:00 2001
From: Sakar Arora <[email protected]>
Date: Tue, 20 Sep 2016 01:01:17 +0530
Subject: [PATCH] net/ip: Fix limit_time calculation in freeing old fragments
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.
--- grub-core/net/ip.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
grub-core/net/ip.c +3 -1
@@ -363,7 +363,9 @@ static voidfree_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)
Signature · 1 line
1.9.1
Committed with trivial formatting change. Thank you!
17.10.2016 08:30, Sakar Arora пишет:
Quoted 50 lines
Hi
Sending the below mentioned patch as an attachment. Please review.
Thanks,
Sakar-----Original Message-----
From: Sakar Arora [mailto:[email protected]]
Sent: Saturday, October 15, 2016 1:26 AM
To: [email protected]
Cc: Bhupesh Sharma <[email protected]>; Sakar Arora <[email protected]>
Subject: [PATCH] net/ip: Fixlimit_timecalculation in freeing old fragmentsFrom: Sakar Arora <[email protected]>
limit_timeunderflows 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 <[email protected]>--- grub-core/net/ip.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)grub-core/net/ip.c +3
-2@@ -363,7 +363,9 @@ static voidfree_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
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel