debian/dhcpd-pools.git
12 years agoInitial debian packaging
Asbjørn Sloth Tønnesen [Tue, 21 Jun 2011 19:08:47 +0000 (19:08 +0000)]
Initial debian packaging

Signed-off-by: Asbjørn Sloth Tønnesen <asbjorn@asbjorn.biz>

13 years agothanks: list update upstream v2.15
Sami Kerola [Tue, 12 Apr 2011 17:43:59 +0000 (19:43 +0200)]
thanks: list update

Signed-off-by: Sami Kerola <kerolasa@iki.fi>

13 years agoshared network names to be dynamically allocated
Sami Kerola [Mon, 11 Apr 2011 18:52:40 +0000 (20:52 +0200)]
shared network names to be dynamically allocated

This patch is a step a head to make data all structures
completely dynamic. After this the next obvious thing to do is to
make shared networks struct a linked list instead of a list.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>

13 years agomake range allocation dynamic
Sami Kerola [Sun, 10 Apr 2011 17:12:29 +0000 (19:12 +0200)]
make range allocation dynamic

This is a test fix after commit

5cbe8d07fb23db630e76d18022f20368312720ec

to see what can be done. Truth is that not much. I could fix how
ranges are allocated, but the fact there is pointers to shared
networks and network names reallocating the memory spaces is not
really going to work. The only way to truly fix this issue is to
create better data structures. As you can expect that is a major
change, and will take some time to implement.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>

13 years agoclean_up: checking errno at exit does not make sense
Sami Kerola [Sat, 9 Apr 2011 15:38:54 +0000 (17:38 +0200)]
clean_up: checking errno at exit does not make sense

It seems that at least FreeBSD is setting errno when malloc is
successful. There is a change that other operating systems will
do similar things with same, or other system calls, and this will
invalidate the idea of checking errno at exit.

See also email list thread for further information.

http://lists.freebsd.org/pipermail/freebsd-questions/2011-April/229150.html

Reported-by: Roar Pettersen <rope1968@gmail.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>

13 years agogetdata: increase max number of shared networks
Sami Kerola [Tue, 5 Apr 2011 19:10:46 +0000 (21:10 +0200)]
getdata: increase max number of shared networks

Anders & Thor Eivind reported dhcpd-pools to mess console and
crash at the end of execution. Reason was missing boundary check.
The fix this time is more of less just a increase to max numbers.
That will work ot some extent.

The memory allocations has to be made fully dynamic, but that is
a little bit difficult with the way default.h and parse_config
are working. Basically problem is globals gone crazy & re-entrant
issue with parse function. The true fix to the issue will have to
wait for complete redesign of internals of the command.

Reported-by: Anders Låstad <ala@nextgentel.com>
Reported-by: Thor Eivind Brantzeg <tbr@nextgentel.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>

13 years agobuild-sys: git describe listed wrong tag
Sami Kerola [Tue, 5 Apr 2011 11:30:50 +0000 (13:30 +0200)]
build-sys: git describe listed wrong tag

The tag v2.14 was probably done without -a option so it was not
recogniced by git describe. To over come this I found easiest to add
--tag to git-version-gen. This change should be reverted after a
release.

Signed-off-by: Sami Kerola <sami.kerola@tomtom.com>

13 years agobuild-sys: use git version as program version output
Sami Kerola [Thu, 31 Mar 2011 12:44:42 +0000 (14:44 +0200)]
build-sys: use git version as program version output

The functionality copied is from gnulib.

http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob;f=build-aux/git-version-gen;h=686f7031a6037445bfcb7b43fb4da3c8240d8575;hb=HEAD

Signed-off-by: Sami Kerola <sami.kerola@tomtom.com>

13 years agodhcpd-pools.h: portable program_invocation_short_name
Sami Kerola [Wed, 23 Mar 2011 21:26:57 +0000 (22:26 +0100)]
dhcpd-pools.h: portable program_invocation_short_name

The program_invocation_short_name portability code is copied
from util-linux project almost as is.

Reported-by: Roar Pettersen <rope1968@gmail.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>

13 years agoflose files & free memory when not needed
Sami Kerola [Sat, 19 Mar 2011 19:39:01 +0000 (20:39 +0100)]
flose files & free memory when not needed

Fixes to issues found with valgrind.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>

13 years agoautotools: point correct location of src
Sami Kerola [Sat, 19 Mar 2011 11:14:52 +0000 (12:14 +0100)]
autotools: point correct location of src

Fix to error where program src is. Also a bit of clean up and
alignment with autoscan output.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>

13 years agogetdata.c: initialize variables to have safe values
Sami Kerola [Sat, 19 Mar 2011 10:55:47 +0000 (11:55 +0100)]
getdata.c: initialize variables to have safe values

Primarily to get rid of following warning.

getdata.c:63:26: warning: 'macstring' may be used uninitialized in this function
getdata.c:66:20: warning: 'macaddr_p' may be used uninitialized in this function

Signed-off-by: Sami Kerola <kerolasa@iki.fi>

13 years agodhcpd-pools.h: indentation fix
Sami Kerola [Sat, 19 Mar 2011 10:52:30 +0000 (11:52 +0100)]
dhcpd-pools.h: indentation fix

Signed-off-by: Sami Kerola <kerolasa@iki.fi>

13 years agodhcpd-pools.h: function attributes declarations
Sami Kerola [Sat, 19 Mar 2011 10:48:48 +0000 (11:48 +0100)]
dhcpd-pools.h: function attributes declarations

Advice compiler about functions to generate better optimization
and argument checks.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>

13 years agoRelease 2.14 v2.14
Sami Kerola [Mon, 7 Mar 2011 21:26:32 +0000 (22:26 +0100)]
Release 2.14

Signed-off-by: Sami Kerola <kerolasa@iki.fi>

13 years agoconfigure.ac: autoscan updates
Sami Kerola [Sun, 13 Feb 2011 12:24:06 +0000 (13:24 +0100)]
configure.ac: autoscan updates

Signed-off-by: Sami Kerola <kerolasa@iki.fi>

13 years agoignore INSTALL file
Sami Kerola [Sat, 12 Feb 2011 22:08:45 +0000 (23:08 +0100)]
ignore INSTALL file

I forgot to put the INSTALL file to .gitignore at the time of
commit fdcfcd12d3fd5a5a62ed7c326c9d7c52c6aefc94

Signed-off-by: Sami Kerola <kerolasa@iki.fi>

13 years agofix to safe_strdup prototype.
Sami Kerola [Sat, 12 Feb 2011 22:07:57 +0000 (23:07 +0100)]
fix to safe_strdup prototype.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>

13 years agoINSTALL file is unnecessary
Sami Kerola [Tue, 8 Feb 2011 21:52:11 +0000 (22:52 +0100)]
INSTALL file is unnecessary

Also few typos got to be fixed.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>

13 years agoAllow xml output with leases to use output file
Sami Kerola [Tue, 8 Feb 2011 21:11:49 +0000 (22:11 +0100)]
Allow xml output with leases to use output file

Signed-off-by: Sami Kerola <kerolasa@iki.fi>

13 years agoCopyright notice change to GNU license 3
Sami Kerola [Tue, 8 Feb 2011 19:33:09 +0000 (20:33 +0100)]
Copyright notice change to GNU license 3

Signed-off-by: Sami Kerola <kerolasa@iki.fi>

13 years agoautogen.sh: typo fix in previous commit
Sami Kerola [Tue, 8 Feb 2011 18:52:38 +0000 (19:52 +0100)]
autogen.sh: typo fix in previous commit

Signed-off-by: Sami Kerola <kerolasa@iki.fi>

13 years agoautogen.sh: test bug fix & clean up to messages
Sami Kerola [Tue, 8 Feb 2011 18:30:57 +0000 (19:30 +0100)]
autogen.sh: test bug fix & clean up to messages

The test had == used as = which is bashisms, and does not work on
system, such as Ubuntu, where /bin/sh is dash or some other
non-bash shell.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>

13 years agoDo not analyze if sort field selector is rubbish.
Sami Kerola [Sat, 22 Jan 2011 21:50:14 +0000 (22:50 +0100)]
Do not analyze if sort field selector is rubbish.

Error message also had a bug, it's changed to be over all more
helpful.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>

13 years agoposix_fadvice advice parameter change
Sami Kerola [Sat, 22 Jan 2011 21:05:53 +0000 (22:05 +0100)]
posix_fadvice advice parameter change

With a bit of manual rereading and thinking I came to conclusion
that users will most likely fetch same data over and over again.
Advicing to kernel to keep pages into cache seems to be correct
thing to do.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>

13 years agoImpossible to reach sections removed
Sami Kerola [Sat, 22 Jan 2011 20:54:38 +0000 (21:54 +0100)]
Impossible to reach sections removed

With a bit of gcov analysis, and logical thinking, it was obvious
that section that got to be removed cannot be reach.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>

13 years agoNot a syscall error, warn should be warnx.
Sami Kerola [Sat, 22 Jan 2011 20:29:48 +0000 (21:29 +0100)]
Not a syscall error, warn should be warnx.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>

13 years agoUse what libc will provide
Sami Kerola [Sat, 22 Jan 2011 19:53:15 +0000 (20:53 +0100)]
Use what libc will provide

The eprintf removed and replaced with err & warn. Option parsing
no longer tries to find missing optargs, which are getopts should
notice. Few complier warnings got to be removed as well. Finally
the commments will no longer exceed standard terminal width.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>

13 years agoOptimization on basis of gcov
Sami Kerola [Sat, 22 Jan 2011 17:24:45 +0000 (18:24 +0100)]
Optimization on basis of gcov

Code blocks to more common first order. Also couple checks got to
be refactored next to section where update happens, that will
reduce unnecessary checking.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>

13 years agoThe xml output is dirty and marked as FIXME
Sami Kerola [Sat, 22 Jan 2011 12:06:04 +0000 (13:06 +0100)]
The xml output is dirty and marked as FIXME

The xml output does not use output file as all other outputs, it
has sections here and there while everything is supposed to be in
output.c, and finally the unnecessary field analysis loop made
program about 20% slower when xml was not asked.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>

13 years agoArithmetic comparisons to be same way around
Sami Kerola [Sat, 22 Jan 2011 11:35:18 +0000 (12:35 +0100)]
Arithmetic comparisons to be same way around

In writing arithmetic comparisons, use "<" and "<=" rather than
">" and ">=". For some justification, read this:

http://thread.gmane.org/gmane.comp.version-control.git/3903/focus=4126

Signed-off-by: Sami Kerola <kerolasa@iki.fi>

13 years agoAutomake 2.64 is needed.
Sami Kerola [Sat, 22 Jan 2011 11:09:33 +0000 (12:09 +0100)]
Automake 2.64 is needed.

This is due AC_PACKAGE_URL that is used in AC_INIT, see release
announcement for details.

http://lists.gnu.org/archive/html/autoconf/2009-07/msg00079.html

Signed-off-by: Sami Kerola <kerolasa@iki.fi>

13 years agoFix to range dynamic-bootp specifier
Sami Kerola [Sat, 22 Jan 2011 11:06:34 +0000 (12:06 +0100)]
Fix to range dynamic-bootp specifier

Rely on inet_aton return value instead of some unreliable
conversion result after first syscall failed.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>

13 years agoAfter fopen in ouput ioctl does like /dev/null which cause v2.13
Sami Kerola [Fri, 21 Jan 2011 23:14:52 +0000 (00:14 +0100)]
After fopen in ouput ioctl does like /dev/null which cause
ENOTTY, and clean_up will see that without this reset. At least
linux does this, and possibly some other systems. There's a
report from FreeBSD 8.0 which matches quite well with the
symptom.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>

13 years agoProper .gitignore files
Sami Kerola [Fri, 21 Jan 2011 22:03:22 +0000 (23:03 +0100)]
Proper .gitignore files

The standard stuff that is needed in ignore files to make git
status etc commands not to freak out after a build.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>

13 years agoOops adding empty m4 directory did not work.
Sami Kerola [Fri, 21 Jan 2011 21:49:37 +0000 (22:49 +0100)]
Oops adding empty m4 directory did not work.

The m4 has now .gitignore without content. That should work just
fine as a place holder director for automake.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>

13 years agoThe automake missed local m4 directory and libtool init.
Sami Kerola [Fri, 21 Jan 2011 21:42:43 +0000 (22:42 +0100)]
The automake missed local m4 directory and libtool init.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>

13 years agoREADME with test data wanted announcement
Sami Kerola [Fri, 21 Jan 2011 21:22:27 +0000 (22:22 +0100)]
README with test data wanted announcement

The file is also reintended to be more like other files.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>

13 years agoREADME to include quick start.
Sami Kerola [Fri, 21 Jan 2011 21:05:37 +0000 (22:05 +0100)]
README to include quick start.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>

13 years agoChangeLog obsoleted
Sami Kerola [Fri, 21 Jan 2011 19:02:06 +0000 (20:02 +0100)]
ChangeLog obsoleted

See git '(log|show|diff)' for all possible details you would ever
need.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>

13 years agoRest of the automake file deletions.
Sami Kerola [Fri, 21 Jan 2011 18:32:18 +0000 (19:32 +0100)]
Rest of the automake file deletions.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>

13 years agoAll files that autotools will generate are removed.
Sami Kerola [Fri, 21 Jan 2011 18:25:06 +0000 (19:25 +0100)]
All files that autotools will generate are removed.

Who ever will compile the sources is encouraged to use
./autogen.sh to get ./configure and other necessary files.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>

13 years agoREADME and THANKS files to support git
Sami Kerola [Fri, 21 Jan 2011 17:51:27 +0000 (18:51 +0100)]
README and THANKS files to support git

Signed-off-by: Sami Kerola <kerolasa@iki.fi>

13 years agoImport from release candidate 2.13.
Sami Kerola [Fri, 21 Jan 2011 17:15:50 +0000 (18:15 +0100)]
Import from release candidate 2.13.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>