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]
Date:   Mon, 24 Sep 2018 14:13:06 -0600
From:   David Ahern <dsahern@...il.com>
To:     Mike Manning <mmanning@...tta.att-mail.com>, netdev@...r.kernel.org
Cc:     Patrick Ruddy <pruddy@...tta.att-mail.com>
Subject: Re: [PATCH net-next v1 5/5] ipv6: add vrf table handling code for
 ipv6 mcast

just started looking at this set. Compiler notes one problem:

On 9/24/18 10:13 AM, Mike Manning wrote:
> @@ -2146,6 +2157,7 @@ static void ip6_mr_forward(struct net *net, struct mr_table *mrt,
>  
>  int ip6_mr_input(struct sk_buff *skb)
>  {
> +	struct rtable *rt = skb_rtable(skb);


The above change is not needed.

$ make -j 24 -s
/home/dsa/kernel-2.git/net/ipv6/ip6mr.c: In function ‘ip6_mr_input’:
/home/dsa/kernel-2.git/net/ipv6/ip6mr.c:2160:17: warning: unused
variable ‘rt’ [-Wunused-variable]
  struct rtable *rt = skb_rtable(skb);


>  	struct mfc6_cache *cache;
>  	struct net *net = dev_net(skb->dev);
>  	struct mr_table *mrt;
> @@ -2154,6 +2166,19 @@ int ip6_mr_input(struct sk_buff *skb)
>  		.flowi6_mark	= skb->mark,
>  	};
>  	int err;
> +	struct net_device *dev;
> +
> +	/* skb->dev passed in is the master dev for vrfs.
> +	 * Get the proper interface that does have a vif associated with it.
> +	 */
> +	dev = skb->dev;
> +	if (netif_is_l3_master(skb->dev)) {
> +		dev = dev_get_by_index_rcu(net, IPCB(skb)->iif);
> +		if (!dev) {
> +			kfree_skb(skb);
> +			return -ENODEV;
> +		}
> +	}
>  
>  	err = ip6mr_fib_lookup(net, &fl6, &mrt);
>  	if (err < 0) {
> @@ -2165,7 +2190,7 @@ int ip6_mr_input(struct sk_buff *skb)
>  	cache = ip6mr_cache_find(mrt,
>  				 &ipv6_hdr(skb)->saddr, &ipv6_hdr(skb)->daddr);
>  	if (!cache) {
> -		int vif = ip6mr_find_vif(mrt, skb->dev);
> +		int vif = ip6mr_find_vif(mrt, dev);
>  
>  		if (vif >= 0)
>  			cache = ip6mr_cache_find_any(mrt,
> @@ -2179,9 +2204,9 @@ int ip6_mr_input(struct sk_buff *skb)
>  	if (!cache) {
>  		int vif;
>  
> -		vif = ip6mr_find_vif(mrt, skb->dev);
> +		vif = ip6mr_find_vif(mrt, dev);
>  		if (vif >= 0) {
> -			int err = ip6mr_cache_unresolved(mrt, vif, skb);
> +			int err = ip6mr_cache_unresolved(mrt, vif, skb, dev);
>  			read_unlock(&mrt_lock);
>  
>  			return err;
> @@ -2191,7 +2216,7 @@ int ip6_mr_input(struct sk_buff *skb)
>  		return -ENODEV;
>  	}
>  
> -	ip6_mr_forward(net, mrt, skb, cache);
> +	ip6_mr_forward(net, mrt, dev, skb, cache);
>  
>  	read_unlock(&mrt_lock);
>  

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ