aboutsummaryrefslogtreecommitdiffstats
path: root/src/libhydra
diff options
context:
space:
mode:
Diffstat (limited to 'src/libhydra')
-rw-r--r--src/libhydra/plugins/kernel_klips/kernel_klips_ipsec.c4
-rw-r--r--src/libhydra/plugins/resolve/resolve_handler.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/libhydra/plugins/kernel_klips/kernel_klips_ipsec.c b/src/libhydra/plugins/kernel_klips/kernel_klips_ipsec.c
index 5ca5879ff..38c92ce71 100644
--- a/src/libhydra/plugins/kernel_klips/kernel_klips_ipsec.c
+++ b/src/libhydra/plugins/kernel_klips/kernel_klips_ipsec.c
@@ -78,7 +78,7 @@
/** this is the default number of ipsec devices */
#define DEFAULT_IPSEC_DEV_COUNT 4
/** TRUE if the given name matches an ipsec device */
-#define IS_IPSEC_DEV(name) (strneq((name), IPSEC_DEV_PREFIX, sizeof(IPSEC_DEV_PREFIX) - 1))
+#define IS_IPSEC_DEV(name) (strpfx((name), IPSEC_DEV_PREFIX))
/** the following stuff is from ipsec_tunnel.h */
struct ipsectunnelconf
@@ -2332,7 +2332,7 @@ METHOD(kernel_ipsec_t, query_policy, status_t,
while (fgets(line, sizeof(line), file))
{
- if (strneq(line, said, strlen(said)))
+ if (strpfx(line, said))
{
/* fine we found the correct line, now find the idle time */
u_int32_t idle_time;
diff --git a/src/libhydra/plugins/resolve/resolve_handler.c b/src/libhydra/plugins/resolve/resolve_handler.c
index 6b8d6be7f..6c57fa0bf 100644
--- a/src/libhydra/plugins/resolve/resolve_handler.c
+++ b/src/libhydra/plugins/resolve/resolve_handler.c
@@ -126,7 +126,7 @@ static void remove_nameserver(private_resolve_handler_t *this,
/* copy all, but matching line */
while (fgets(line, sizeof(line), in))
{
- if (strneq(line, matcher, strlen(matcher)))
+ if (strpfx(line, matcher))
{
DBG1(DBG_IKE, "removing DNS server %H from %s",
addr, this->file);