Skip to content

Commit

Permalink
Merge pull request #19 from mimuret/develop
Browse files Browse the repository at this point in the history
Response matching is now disable
  • Loading branch information
mimuret committed Mar 1, 2016
2 parents 9c4d912 + 027c4d4 commit 7a26d2a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
7 changes: 6 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@
# Process this file with autoconf to produce a configure script.

AC_PREREQ([2.63])
AC_INIT(iptables-ext-dns,1.0.3 , mimuret@gmail.com)
m4_define([VERSION_MAJOR],[1])
m4_define([VERSION_MINOR],[1])
m4_define([VERSION_MICRO],[0])
AC_INIT(iptables-ext-dns,m4_defn([VERSION_MAJOR]).m4_defn([VERSION_MINOR]).m4_defn([VERSION_MICRO]), mimuret@gmail.com, iptables-ext-dns)
AC_SUBST(VERSION_INFO, [VERSION_MAJOR:VERSION_MINOR:VERSION_MICRO])

AC_CONFIG_AUX_DIR(misc)
AM_INIT_AUTOMAKE([foreign])
AC_CONFIG_SRCDIR([extensions/libxt_dns.c])
Expand Down
2 changes: 1 addition & 1 deletion extensions/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
nobase_lib_LTLIBRARIES = xtables/libxt_dns.la
xtables_libxt_dns_la_SOURCES = libxt_dns.c
xtables_libxt_dns_la_CFLAGS = -lresolv -I../include
xtables_libxt_dns_la_LDFLAGS = -version-info 1:3:0
xtables_libxt_dns_la_LDFLAGS = -version-info @VERSION_INFO@
2 changes: 1 addition & 1 deletion iptables-ext-dns.spec → iptables-ext-dns.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

Summary: Administration tool for IPv4/IPv6 TCP/UDP packet filtering.
Name: iptables-ext-dns
Version: 1.0.3
Version: @PACKAGE_VERSION@
Release: 0%{?dist}
License: GPLv3
Group: System Environment/Base
Expand Down
5 changes: 2 additions & 3 deletions modules/xt_dns.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,7 @@ static bool dns_mt_tcp(const struct sk_buff *skb, XT_PARAM *par,
HOTDROP(par);
return false;
}
if (!(th->ack & th->psh) ||
(ntohs(th->source) != DNS_PORT && ntohs(th->dest) != DNS_PORT)) {
if (!(th->ack & th->psh) || (th->dest != htons(DNS_PORT))) {
DEBUG_PRINT("not dns packet");
return false;
}
Expand All @@ -206,7 +205,7 @@ static bool dns_mt_udp(const struct sk_buff *skb, XT_PARAM *par,
HOTDROP(par);
return false;
}
if (ntohs(uh->source) != DNS_PORT && ntohs(uh->dest) != DNS_PORT) {
if (uh->dest != htons(DNS_PORT)) {
DEBUG_PRINT("not dns packet");
return false;
}
Expand Down

0 comments on commit 7a26d2a

Please sign in to comment.