Project

General

Profile

Actions

Bug #755

closed

dnswatch not working

Added by Warren Baker over 14 years ago. Updated almost 14 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
IPsec
Target version:
Start date:
07/20/2010
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
2.0
Affected Architecture:

Description

HI Guys

I noticed that in the latest snapshot dnswatch fails to startup as it seg faults. I managed to get it recompiled with debugging and it is because of /var/etc/dnswatch-ipsec.hosts containing just the hostname. Which is fine except one of the functions, in dnswatch.c, makes use of properties_read().
I am no C programmer but looking at the man file this function requires the contents of the file it is reading to contain a name=value pair - which the contents of dnswatch-ipsec.hosts does not contain. Running the program on a FBSD8 box works fine - so i assume one of the header files(?) on the pfSense box is older and exits when it can't find the '=' in the file it is reading.

So I did my best to remove the properties_read() function and replace it with a fopen() of the file,a fgets for the line (or multiple lines that may be in the file) and assign that to an array which is then used in the while loop. There is most likely a better way of doing this so please do let me know of all my mistakes in the attached patch.

But for now it is working and my DynDNS tunnels on the latest snapshots are all working \o/ (well it seems to be working).

Thx
Warren


Files

dnswatch.patch (7.44 KB) dnswatch.patch Warren Baker, 07/20/2010 03:10 PM
Actions

Also available in: Atom PDF