[nft] proto: Add router advertisement and solicitation icmp types
diff mbox

Message ID 20160309185304.GA13575@sonyv
State Accepted
Delegated to: Pablo Neira
Headers show

Commit Message

Laura Garcia March 9, 2016, 6:53 p.m. UTC
Enable support for router-advertisement and router-solicitation icmp types in nft.

Example:
$ sudo nft add rule ip filter input icmp type router-advertisement counter accept
$ sudo nft add rule ip filter input icmp type router-solicitation counter accept

Signed-off-by: Laura Garcia Liebana <nevola@gmail.com>
---
 src/proto.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Pablo Neira Ayuso March 10, 2016, 11:16 a.m. UTC | #1
On Wed, Mar 09, 2016 at 07:53:07PM +0100, Laura Garcia Liebana wrote:
> Enable support for router-advertisement and router-solicitation icmp types in nft.
> 
> Example:
> $ sudo nft add rule ip filter input icmp type router-advertisement counter accept
> $ sudo nft add rule ip filter input icmp type router-solicitation counter accept

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

Patch
diff mbox

diff --git a/src/proto.c b/src/proto.c
index 0ed98ed..b54a4c1 100644
--- a/src/proto.c
+++ b/src/proto.c
@@ -299,6 +299,8 @@  static const struct symbol_table icmp_type_tbl = {
 		SYMBOL("source-quench",			ICMP_SOURCE_QUENCH),
 		SYMBOL("redirect",			ICMP_REDIRECT),
 		SYMBOL("echo-request",			ICMP_ECHO),
+		SYMBOL("router-advertisement",		ICMP_ROUTERADVERT),
+		SYMBOL("router-solicitation",		ICMP_ROUTERSOLICIT),
 		SYMBOL("time-exceeded",			ICMP_TIME_EXCEEDED),
 		SYMBOL("parameter-problem",		ICMP_PARAMETERPROB),
 		SYMBOL("timestamp-request",		ICMP_TIMESTAMP),