lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 16 Jul 2014 10:26:07 +0200
From:	Nicolas Dichtel <nicolas.dichtel@...nd.com>
To:	roopa@...ulusnetworks.com, davem@...emloft.net,
	stephen@...workplumber.org, netdev@...r.kernel.org
CC:	shm@...ulusnetworks.com, nolan@...ulusnetworks.com,
	sfeldma@...ulusnetworks.com, jhs@...atatu.com
Subject: Re: [PATCH iproute2 v1] link dump filter

Le 16/07/2014 05:28, roopa@...ulusnetworks.com a écrit :
> From: Roopa Prabhu <roopa@...ulusnetworks.com>
>
> This patch avoids a full link wildump request when the user has specified
> a single link. Uses RTM_GETLINK without the NLM_F_DUMP flag.
>
> This helps on a system with large number of interfaces.
>
> This patch currently only uses the link ifindex in the filter.
> Hoping to provide a subsequent kernel patch to do link dump filtering on
> other attributes in the kernel.
>
> In iplink_get, to be safe, this patch currently sets the answer buffer
> size to the max size that libnetlink rtnl_talk can copy. The current api
> does not seem to provide a way to indicate the answer buf size.
>
> changelog from RFC to v1:
>      - incorporated comments from stephen (fixed comment and fixed if/else block)
>
> Signed-off-by: Roopa Prabhu <roopa@...ulusnetworks.com>
> ---
>   ip/ip_common.h |    1 +
>   ip/ipaddress.c |   13 +++++++++++++
>   ip/iplink.c    |   32 ++++++++++++++++++++++++++++++++
>   3 files changed, 46 insertions(+)
>
> diff --git a/ip/ip_common.h b/ip/ip_common.h
> index ac1e4c1..e56d1ac 100644
> --- a/ip/ip_common.h
> +++ b/ip/ip_common.h
> @@ -51,6 +51,7 @@ extern int do_ipl2tp(int argc, char **argv);
>   extern int do_tcp_metrics(int argc, char **argv);
>   extern int do_ipnetconf(int argc, char **argv);
>   extern int do_iptoken(int argc, char **argv);
> +extern int iplink_get(unsigned int flags, char *name, __u32 filt_mask);
>
>   static inline int rtm_get_table(struct rtmsg *r, struct rtattr **tb)
>   {
> diff --git a/ip/ipaddress.c b/ip/ipaddress.c
> index 8138e86..f64c0ed 100644
> --- a/ip/ipaddress.c
> +++ b/ip/ipaddress.c
> @@ -1241,6 +1241,19 @@ static int ipaddr_list_flush_or_save(int argc, char **argv, int action)
>   		exit(0);
>   	}
>
> +    /*
> +     * If only filter_dev present and none of the other
> +     * link filters are present, use RTM_GETLINK to get
> +     * the link device
> +     */
The comment is indented with spaces instead tabs.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ