Begin work on source address caching (linux)
This commit is contained in:
parent
c545d63bb9
commit
eefa47b0f9
5 changed files with 273 additions and 11 deletions
|
|
@ -29,6 +29,11 @@ func (a *AtomicBool) Set(val bool) {
|
|||
atomic.StoreInt32(&a.flag, flag)
|
||||
}
|
||||
|
||||
func toInt32(n uint32) int32 {
|
||||
mask := uint32(1 << 31)
|
||||
return int32(-(n & mask) + (n & ^mask))
|
||||
}
|
||||
|
||||
func min(a uint, b uint) uint {
|
||||
if a > b {
|
||||
return b
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue