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] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.11.1506190857520.1731@ja.home.ssi.bg>
Date:	Fri, 19 Jun 2015 09:59:01 +0300 (EEST)
From:	Julian Anastasov <ja@....bg>
To:	Roopa Prabhu <roopa@...ulusnetworks.com>
cc:	ebiederm@...ssion.com, rshearma@...cade.com, tgraf@...g.ch,
	davem@...emloft.net, netdev@...r.kernel.org
Subject: Re: [PATCH net-next RFC v2 2/3] ipv4: add support for light weight
 tunnel encap attributes


	Hello,

On Thu, 18 Jun 2015, Roopa Prabhu wrote:

> @@ -366,6 +371,7 @@ static inline size_t fib_nlmsg_size(struct fib_info *fi)
>  	payload += nla_total_size((RTAX_MAX * nla_total_size(4)));
>  
>  	if (fi->fib_nhs) {
> +		size_t nh_encapsize = 0;

	Var not in #ifdef. Any warnings with CONFIG_LWTUNNEL=n?

>  		/* Also handles the special case fib_nhs == 1 */
>  
>  		/* each nexthop is packed in an attribute */
> @@ -374,8 +380,23 @@ static inline size_t fib_nlmsg_size(struct fib_info *fi)
>  		/* may contain flow and gateway attribute */
>  		nhsize += 2 * nla_total_size(4);
>  
> +#ifdef CONFIG_LWTUNNEL
> +		/* grab encap info */
> +		for_nexthops(fi) {
> +			if (nh->nh_lwtstate) {
> +				/* RTA_ENCAP_TYPE */
> +				nh_encapsize += lwtunnel_get_encap_size(
> +						nh->nh_lwtstate);

	New labels not in #ifdef:

> +
> +err_inval:
> +	ret = -EINVAL;
> +
> +errout:
> +	return ret;
>  }

	Some other places may need changes:

- nh_comp: there is logic that decides if same fib_info
is reused from many fib nodes. There should be check
if NH matches by nh_lwtstate.

- xfrm4_fill_dst: not sure about this but some fields
are copied.

Regards

--
Julian Anastasov <ja@....bg>
--
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