Project

General

Profile

Actions

Bug #755

closed

dnswatch not working

Added by Warren Baker almost 14 years ago. Updated over 13 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 #1

Updated by Ermal Luçi almost 14 years ago

  • Status changed from New to Feedback

Patched.

Actions #2

Updated by Warren Baker over 13 years ago

Is there a link to your patch? I dont see any changes in the repository?

Actions #3

Updated by Ermal Luçi over 13 years ago

Its not a patch against dnswatch but against the php script that writes the configuration file.

Actions #4

Updated by Warren Baker over 13 years ago

Ok i thought about making that change to the way the file is written but figured that wasn't the most ideal way of handling it although it is the easiest.

Actions #5

Updated by Chris Buechler over 13 years ago

  • Project changed from 3 to pfSense
Actions #6

Updated by Chris Buechler over 13 years ago

  • Category set to IPsec
  • Status changed from Feedback to New
  • Target version set to 2.0
  • Affected Version set to 2.0

dnswatch crashes immediately upon running.

kernel: pid 45001 (dnswatch), uid 0: exited on signal 11 (core dumped)

example contents of /var/etc/dnswatch-ipsec.hosts:

domain.example.com = value
Actions #7

Updated by Chris Buechler over 13 years ago

  • Subject changed from dnswatch to dnswatch not working
Actions #8

Updated by Ermal Luçi over 13 years ago

  • Status changed from New to Feedback
Actions #9

Updated by Warren Baker over 13 years ago

Will check and revert but might take awhile since my remote site is unavailable at the moment :$

Actions #10

Updated by Chris Buechler over 13 years ago

Warren: have you tested this?

Actions #11

Updated by Warren Baker over 13 years ago

Chris Buechler wrote:

Warren: have you tested this?

Yeah - it was working 100%. I could not test for extended periods of time but for the 2 days I had the remote site up it worked 100% and handled the IP and DynDNS update.
I haven't tested on the later snapshots, will do so once I am back home which is towards the end of the week.

Actions #12

Updated by Chris Buechler over 13 years ago

  • Status changed from Feedback to Resolved
Actions #13

Updated by Warren Baker over 13 years ago

Unfortunately this is still core dumping for me on latest snaps.

Actions #14

Updated by Chris Buechler over 13 years ago

  • Status changed from Resolved to New
Actions #15

Updated by Warren Baker over 13 years ago

Just for issue tracking - I have, offlist, mailed gdb output from the core to Ermal.

Actions #16

Updated by Ermal Luçi over 13 years ago

Pushed a patch to check for null hostnames from the bt it seems null hostname was passed to the gethostbyname which made it crash!

Actions #17

Updated by Ermal Luçi over 13 years ago

  • Status changed from New to Resolved
Actions

Also available in: Atom PDF