Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Make Gossip DNS reject gossip messages if clockskew > tombstoneTimeout / 2 #1176

Merged
merged 1 commit into from
Jul 20, 2015

Conversation

tomwilkie
Copy link
Contributor

Fixes #1156

5mins max clock skew seems too small to me; I suggest we make it bigger (and therefore make the DNS tombstone timeout larger).

@tomwilkie tomwilkie self-assigned this Jul 17, 2015
return nil, nil, err
}

if err := entries.check(); err != nil {
if gossip.Timestamp < now()-int64(gossipWindow/time.Second) {
return nil, nil, fmt.Errorf("Refusing old gossip message: %d", gossip.Timestamp)

This comment was marked as abuse.

return nil, nil, err
}

if err := entries.check(); err != nil {
if delta := gossip.Timestamp - now(); delta > gossipWindow || delta < -gossipWindow {
return nil, nil, fmt.Errorf("Refusing old gossip message (delta %d): %d", delta, gossip.Timestamp)

This comment was marked as abuse.

@bboreham
Copy link
Contributor

Apart from one nit this LOKTM

@tomwilkie
Copy link
Contributor Author

@bboreham I've addressed your comment and after discussion with @rade increase the tombstone timeout on DNS to 30mins (allow a max clockskew of 15mins)

@tomwilkie tomwilkie assigned bboreham and unassigned tomwilkie Jul 20, 2015
@tomwilkie
Copy link
Contributor Author

Test failure is flakey TestNameservers so can safely be ignored. I'm looking into it.

bboreham added a commit that referenced this pull request Jul 20, 2015
@bboreham bboreham merged commit 90b7c36 into master Jul 20, 2015
@tomwilkie tomwilkie deleted the 1156-gossip-timestamp branch July 20, 2015 13:28
@rade rade added this to the 1.1.0 milestone Jul 21, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants