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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Sun, 13 Mar 2016 23:15:38 -0700
From:	Stephen Hemminger <stephen@...workplumber.org>
To:	Zhang Shengju <zhangshengju@...s.chinamobile.com>
Cc:	netdev@...r.kernel.org
Subject: Re: [net-next,iproute2] netconf: add support for ignore route
 attribute

On Mon, 14 Mar 2016 04:55:36 +0000
Zhang Shengju <zhangshengju@...s.chinamobile.com> wrote:

> Add support for ignore_routes_with_linkdown attribute.
> 
> Signed-off-by: Zhang Shengju <zhangshengju@...s.chinamobile.com>
> ---
>  ip/ipnetconf.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/ip/ipnetconf.c b/ip/ipnetconf.c
> index eca6eee..6fec818 100644
> --- a/ip/ipnetconf.c
> +++ b/ip/ipnetconf.c
> @@ -119,6 +119,10 @@ int print_netconf(const struct sockaddr_nl *who, struct rtnl_ctrl_data *ctrl,
>  		fprintf(fp, "proxy_neigh %s ",
>  			*(int *)RTA_DATA(tb[NETCONFA_PROXY_NEIGH])?"on":"off");
>  
> +	if (tb[NETCONFA_IGNORE_ROUTES_WITH_LINKDOWN])
> +		fprintf(fp, "ignore_routes_with_linkdown %s ",
> +			*(int *)RTA_DATA(tb[NETCONFA_IGNORE_ROUTES_WITH_LINKDOWN])?"on":"off");

This is a good idea.

But the option name is too long, and the code does not follow current best practices.
  1. Lines are too long
  2. There needs to be whitespace around ? :
  3. There are helper routines (rte_getattr_XXX) which should be used rather than
     cast RTE_DATA directly.

Also, help and man page??

Powered by blists - more mailing lists