[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how to emulate wrong data in shm to cheat ntpd
From: |
Gary E. Miller |
Subject: |
Re: how to emulate wrong data in shm to cheat ntpd |
Date: |
Tue, 2 Jun 2020 13:53:30 -0700 |
Yo артур!
On Tue, 02 Jun 2020 23:01:54 +0300
артур хайруллин <ya_dinamovec@mail.ru> wrote:
> I am interested in opportunity to cheat ntpd by putting wrong data to
> shm like gpsd does.
Data is data. gpsd passes on what it gets. Garbage in, garbage out.
> The problem is that gps receivers i use have a strange habit to lie
> about the time periodically.
I would like to get a binary capture of an even like that. just
use "gpsd -R > tmp.raw" to grab the raw data.
> Gpsd daemon communicates with ntpd
> daemon through SHM and provides data to adjust system clock. Wrong
> data taken from gps receivers cheat ntpd and my system for some time
> move forward or back on time chart for some seconds or couple of
> years.
This should not happen. What ntpd are you using? ntpd usually
wants at least 3 sources to agree on a time before using it. Are
all three of your sources failing the same way? Also, ntpd does
not make large changes after startup, so something is not working
as designed.
> I want to add to ntp.conf another ntp servers(internet) with low
> stratum to block that situation.
Stratum does not really matter. Jitter matters. You should always
have more than 3.
> But before i have to research the
> opportunity to cheat ntpd with gpsfake utility(i have long logs of
> gpspipe).
Hopefully raw logs, please send them.
> I made some fixes to python scripts to make them correct
> and now gpsfake emulates old data. I see it in cgps utility.
Fixes for what? gpsfake is used for the regression tests for
data going back 20 years.
> But gpsfake(as i saw yesterday) doesn't push this data to SHM.
Intentional. Otherwise regression tests, and other tests, mess up the
clients. If there is a way to send bad data to the clients then
many people would try it, and that would be bad.
> I want
> to know (before some code changes - if it will be necessary) if there
> is some mean to do that in gpsd project?
No way, currently, to get gpsfake to send data to SHM. It might
be easier to just write a small SHM simulator.
RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
gem@rellim.com Tel:+1 541 382 8588
Veritas liberabit vos. -- Quid est veritas?
"If you can't measure it, you can't improve it." - Lord Kelvin
pgpqndRZDEV41.pgp
Description: OpenPGP digital signature