9 Commits
Author SHA1 Message Date
Nayana BidariandgVisor bot 90266aa28a Netstack S/R: Mark all the structs in netstack as savable.
Marks the structs in netstack as savable. This does not change or break any
existing behavior as the netstack itself is not savable yet.

PiperOrigin-RevId: 635943481
2024-05-21 15:19:07 -07:00
Adin ScannellandgVisor bot 1ceb814544 Add default_applicable_licenses rules to packages.
PiperOrigin-RevId: 513581243
2023-03-02 10:50:04 -08:00
Ghanan GowripalanandgVisor bot 3d4743d960 Implement null timer
NullClock.AfterFunc should not return nil as that violates the API
expectations. Instead, return a timer that never fires.

PiperOrigin-RevId: 500240130
2023-01-06 15:27:20 -08:00
Kevin KrakauerandgVisor bot d8aa09e04c convert uses of interface{} to any
Done via:
  find . -name "*.go" | xargs sed -i -E 's/interface\{\}/any/g'

PiperOrigin-RevId: 487033228
2022-11-08 13:14:06 -08:00
Tamir DubersteinandgVisor bot 4f2439fb0e Use opaque types to represent time
Introduce tcpip.MonotonicTime; replace int64 in tcpip.Clock method
returns with time.Time and MonotonicTime to improve type safety and
ensure that monotonic clock readings are never compared to wall clock
readings.

PiperOrigin-RevId: 375775907
2021-05-25 13:00:29 -07:00
Tamir DubersteinandgVisor bot df7c82a60c Move RunImmediatelyScheduledJobs to faketime
Use it everywhere.

PiperOrigin-RevId: 375539262
2021-05-24 13:05:02 -07:00
Ghanan GowripalanandgVisor bot 56fb2ec119 Do not use clockwork for faketime
Clockwork does not support timers being reset/stopped from different
goroutines. Our current use of clockwork causes data races and
gotsan complains about clockwork.

This change uses our own implementation of faketime, avoiding data
races.

PiperOrigin-RevId: 354428208
2021-01-28 17:08:12 -08:00
Toshi KikuchiandgVisor bot f15182243e Discard IP fragments as soon as it expires
Currently expired IP fragments are discarded only if another fragment for the
same IP datagram is received after timeout or the total size of the fragment
queue exceeded a predefined value.

Test: fragmentation.TestReassemblingTimeout

Fixes #3960

PiperOrigin-RevId: 334423710
2020-09-29 11:29:50 -07:00
Toshi KikuchiandgVisor bot 6e5ea605f4 Move stack.fakeClock into a separate package
PiperOrigin-RevId: 333138701
2020-09-22 12:45:23 -07:00