[PATCH 1/2] iptables: nft-ipv4: Add ip ttl to the buffer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add the string "ip ttl" to the buffer whenever a match for ttl is found as
ttl needs to be specified with the version of protocol being used.

Signed-off-by: Shivani Bhardwaj <shivanib134@xxxxxxxxx>
---
 iptables/nft-ipv4.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/iptables/nft-ipv4.c b/iptables/nft-ipv4.c
index ede8f17..684096f 100644
--- a/iptables/nft-ipv4.c
+++ b/iptables/nft-ipv4.c
@@ -477,6 +477,9 @@ static int nft_ipv4_xlate(const void *data, struct xt_buf *buf)
 			   inet_ntoa(cs->fw.ip.dst));
 	}
 
+	if (xlate_find_match(cs, "ttl"))
+		xt_buf_add(buf, "ip ttl ");
+
 	ret = xlate_matches(cs, buf);
 	if (!ret)
 		return ret;
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux