Re: ax25ipd.c routing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

To unsubscribe from this list: send the line "unsubscribe linux-hams" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at

[Linux Newbie]     [Kernel Newbies]     [Memory]     [Git]     [Security]     [Netfilter]     [Linux Admin]     [Bugtraq]     [Photo]     [Yosemite Photos]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [ARM Linux Kernel]     [Linux Networking]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linux Resources]

Add to Google Powered by Linux