From: Cathryn Mataga <cathryn@junglevision.com>
To: Thomas Osterried <thomas@x-berg.in-berlin.de>
Cc: linux-hams@vger.kernel.org
Subject: Re: ax25ipd.c routing
Date: Tue, 08 Dec 2009 14:15:36 -0800 [thread overview]
Message-ID: <4B1ED008.4090302@junglevision.com> (raw)
In-Reply-To: <20091207235111.GS19524@x-berg.in-berlin.de>
http://hamradio.ke6i.com/ax25ipddyn.patch
I made another patch. This one against 0.0.8.rc2 again.
This combines my original change with the dynamic DNS patch.
I know this is one of those 'big patches' that everyone hates,
so, sorry. I tested this a bit, but I think I'll let this run
on my AX25 system for about a week before I try to make it official.
Mostly, I'm posting this in case anyone is curious. This does
the change, as requested for the DNS patch, to make it use a
thread. I use pthread_create to create the thread. Also when
IP's are changed or referenced, the code uses pthread_mutex_lock
to protect the change. I had to touch a few places in the code
for this.
This is my idea for the 'when to check dns' issue.
1. If a packet comes in with the callsign of a listed route, that
does not match the expected IP, trigger a DNS lookup, provided
a DNS lookup has not happened within 5 minutes.
2. Otherwise check DNS every hour. 60*60 seconds.
3. If the 'P' flag is set never check DNS.
This is not really well-tested, though I have seen IP's update via DNS
in the log. I believe that a packet should come in relatively soon
after an ip change and this should allow for a relatively quick
response. The 5 minute delay is to prevent DNS from getting
hit too hard if a lot of these packets arrive.
The 1 hour check is a fallback, in the event that both systems are
set to Dynamic DNS, and both change at about the same time, or if
other mysterious circumstances occur.
I tried to save the idea of the original dyndns patch of checking DNS
later if DNS fails on startup. In this situation, I set the IP to 0.
A check is added to prevent packets from being sent to ip=0.
next prev parent reply other threads:[~2009-12-08 22:15 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <S1752195AbZK3HxQ/20091130075316Z+372@vger.kernel.org>
2009-11-30 20:38 ` nr0 doesn't show up (netrom) Cathryn Mataga
2009-11-30 21:13 ` Cathryn Mataga
2009-11-30 21:48 ` Cathryn Mataga
2009-12-01 6:05 ` Cathryn Mataga
2009-12-07 10:30 ` ax25ipd.c routing Cathryn Mataga
2009-12-07 16:25 ` Thomas Osterried
2009-12-07 20:02 ` Cathryn Mataga
2009-12-07 20:26 ` Thomas Osterried
2009-12-07 23:30 ` Ray Wells
[not found] ` <4B1D84C4.8000206@exemail.com.au>
[not found] ` <20091207235111.GS19524@x-berg.in-berlin.de>
2009-12-08 1:45 ` Cathryn Mataga
2009-12-08 5:11 ` Cathryn Mataga
2009-12-08 22:15 ` Cathryn Mataga [this message]
2009-12-15 23:14 ` [PATCH] ax25ipd Cathryn Mataga
2009-12-25 11:35 ` [PATCH] call.c Cathryn Mataga
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B1ED008.4090302@junglevision.com \
--to=cathryn@junglevision.com \
--cc=linux-hams@vger.kernel.org \
--cc=thomas@x-berg.in-berlin.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).