From ccb5ffef9195bd7f070e3e58a5c3a342a703af57 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20De=20Keersmaeker?=
 <francois.dekeersmaeker@uclouvain.be>
Date: Fri, 18 Oct 2024 13:23:32 +0000
Subject: [PATCH] Template: HTTP: match ONLY on HTTP traffic

---
 profile_translator_blocklist/templates/callback.c.j2 | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/profile_translator_blocklist/templates/callback.c.j2 b/profile_translator_blocklist/templates/callback.c.j2
index 46982b9..477630a 100644
--- a/profile_translator_blocklist/templates/callback.c.j2
+++ b/profile_translator_blocklist/templates/callback.c.j2
@@ -152,9 +152,6 @@ uint32_t callback_{{nfqueue_name}}(int pkt_id, int pkt_len, uint8_t *payload, vo
     /* Policy {{policy_name}} */
     {% if policy.nfq_matches %}
     if (
-        {% if policy.custom_parser == 'http' %}
-        !is_http_message || (
-        {% endif %}
         {% set rule = policy.nfq_matches[0] %}
         {% if rule['template'] | is_list %}
         (
@@ -187,9 +184,6 @@ uint32_t callback_{{nfqueue_name}}(int pkt_id, int pkt_len, uint8_t *payload, vo
         {{ rule['template'].format(rule['match']) }}
         {% endif %}
         {% endfor %}
-        {% if policy.custom_parser == 'http' %}
-        )
-        {% endif %}
     ) {
 
         {% set is_dns_response = namespace(value=False) %}
-- 
GitLab