Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
misje committed Dec 17, 2016
2 parents 2b7000d + 14db414 commit f40b170
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 7 deletions.
1 change: 1 addition & 0 deletions debian/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ dhcpoptinj.postrm.debhelper
dhcpoptinj.prerm.debhelper
dhcpoptinj.substvars
files
debhelper-build-stamp
8 changes: 8 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
dhcpoptinj (0.4.0-1) unstable; urgency=low
* Fix program name simplification bug
* Remove typo in help text
* Use constant for maximum queue length instead of hard-coded value
* Fix incorrect fields in debian/control and update dependencies

-- Andreas Misje <amisje@gmail.com> Tue, 13 Dec 2016 15:48:03 +0100

dhcpoptinj (0.3.0-1) unstable; urgency=low
* Add support for replacing existing DHCP options
* Allow injecting multiple options of same type
Expand Down
6 changes: 3 additions & 3 deletions debian/control
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
Source: dhcpoptinj
Maintainer: Andreas Misje <amisje@gmail.com>
Section: net
Priority: optional
Priority: extra
Homepage: http://github.com/misje/dhcpoptinj
Build-Depends: debhelper (>=9), libnetfilter-queue-dev (>= 1)
Build-Depends: debhelper (>= 9), libnetfilter-queue-dev (>= 1)

Package: dhcpoptinj
Architecture: any
Depends: libnetfilter-queue1
Depends: ${misc:Depends}, ${shlibs:Depends}
Recommends: iptables-persistent
Description: DHCP option injector
dhcpoptinj is a simple utility for injecting DHCP options into DHCP packets.
Expand Down
2 changes: 1 addition & 1 deletion src/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ static void printHelp(const char *programName)
" through. The default behaviour is to drop\n"
" the packet if options could not be injected\n"
" -h, --help Print this help text\n"
" -i, --ignore-existing-opt Proceed if an injected options already exists\n"
" -i, --ignore-existing-opt Proceed if an injected option already exists\n"
" in the original packet. Unless\n"
" --remove-exisiting-opt is provided, the\n"
" default behaviour is to drop the packet\n"
Expand Down
8 changes: 5 additions & 3 deletions src/dhcpoptinj.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ int main(int argc, char *argv[])
exit(EXIT_FAILURE);
}

if (nfq_set_queue_maxlen(queue, 20) < 0)
if (nfq_set_queue_maxlen(queue, maxQueueLen) < 0)
{
logMessage(LOG_ERR, "Failed to set netfilter queue length: %s\n", strerror(
errno));
Expand Down Expand Up @@ -501,8 +501,10 @@ static void logMessage(int priority, const char *format, ...)

static void simplifyProgramName(char *programName)
{
size_t strLen = strlen(programName);
memmove(programName, basename(programName), strLen + 1);
char *simplifiedName = basename(programName);
size_t len = strlen(simplifiedName);
memmove(programName, simplifiedName, len);
programName[len] = '\0';
}

static void writePID()
Expand Down

0 comments on commit f40b170

Please sign in to comment.