[libnfnetlink] rtnl: fix wrong netlink group bindings in the interface API

Pablo Neira netfilter-cvslog-bounces at lists.netfilter.org
Wed Apr 29 02:26:11 CEST 2009


Gitweb:		http://git.netfilter.org/cgi-bin/gitweb.cgi?p=libnfnetlink.git;a=commit;h=5186605c9361493ec43379a55a5422a2a25c802d
commit 5186605c9361493ec43379a55a5422a2a25c802d
Author:     Pablo Neira Ayuso <pablo at netfilter.org>
AuthorDate: Wed Apr 29 02:21:56 2009 +0200
Commit:     Pablo Neira Ayuso <pablo at netfilter.org>
CommitDate: Wed Apr 29 02:21:56 2009 +0200

    rtnl: fix wrong netlink group bindings in the interface API
    
    This patch removes RTMGRP_IPV4_ROUTE and RTMGRP_IPV4_IFADDR which
    report event notifications about changes in the route and address
    of interfaces. We are only interested in the interface link status
    so RTMGRP_LINK is enough.
    
    Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
       via  5186605c9361493ec43379a55a5422a2a25c802d (commit)
      from  269a060f38395b8ec64f915f68d4f79a4430780a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 5186605c9361493ec43379a55a5422a2a25c802d
Author: Pablo Neira Ayuso <pablo at netfilter.org>
Date:   Wed Apr 29 02:21:56 2009 +0200

    rtnl: fix wrong netlink group bindings in the interface API
    
    This patch removes RTMGRP_IPV4_ROUTE and RTMGRP_IPV4_IFADDR which
    report event notifications about changes in the route and address
    of interfaces. We are only interested in the interface link status
    so RTMGRP_LINK is enough.
    
    Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>

-----------------------------------------------------------------------

 src/rtnl.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
This patch removes RTMGRP_IPV4_ROUTE and RTMGRP_IPV4_IFADDR which
report event notifications about changes in the route and address
of interfaces. We are only interested in the interface link status
so RTMGRP_LINK is enough.

Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>

diff --git a/src/rtnl.c b/src/rtnl.c
index 93820f1..548dc09 100644
--- a/src/rtnl.c
+++ b/src/rtnl.c
@@ -214,8 +214,7 @@ struct rtnl_handle *rtnl_open(void)
 
 	memset(&h->rtnl_local, 0, sizeof(h->rtnl_local));
 	h->rtnl_local.nl_family = AF_NETLINK;
-	h->rtnl_local.nl_groups =
-		RTMGRP_IPV4_ROUTE|RTMGRP_IPV4_IFADDR|RTMGRP_LINK;
+	h->rtnl_local.nl_groups = RTMGRP_LINK;
 	if (bind(h->rtnl_fd, (struct sockaddr *) &h->rtnl_local, addrlen) < 0) {
 		rtnl_log(LOG_ERROR, "unable to bind rtnetlink socket");
 		goto err_close;



More information about the netfilter-cvslog mailing list