mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	ipv6: Remove unused neigh argument for icmp6_dst_alloc() and its callers.
Because of rt->n removal, we do not need neigh argument any more. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
		
							parent
							
								
									4505f40a6f
								
							
						
					
					
						commit
						12fd84f438
					
				
					 4 changed files with 7 additions and 14 deletions
				
			
		| 
						 | 
					@ -103,7 +103,6 @@ extern struct rt6_info		*rt6_lookup(struct net *net,
 | 
				
			||||||
					    int oif, int flags);
 | 
										    int oif, int flags);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
extern struct dst_entry *icmp6_dst_alloc(struct net_device *dev,
 | 
					extern struct dst_entry *icmp6_dst_alloc(struct net_device *dev,
 | 
				
			||||||
					 struct neighbour *neigh,
 | 
					 | 
				
			||||||
					 struct flowi6 *fl6);
 | 
										 struct flowi6 *fl6);
 | 
				
			||||||
extern int icmp6_dst_gc(void);
 | 
					extern int icmp6_dst_gc(void);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1391,7 +1391,7 @@ static void mld_sendpack(struct sk_buff *skb)
 | 
				
			||||||
	icmpv6_flow_init(net->ipv6.igmp_sk, &fl6, ICMPV6_MLD2_REPORT,
 | 
						icmpv6_flow_init(net->ipv6.igmp_sk, &fl6, ICMPV6_MLD2_REPORT,
 | 
				
			||||||
			 &ipv6_hdr(skb)->saddr, &ipv6_hdr(skb)->daddr,
 | 
								 &ipv6_hdr(skb)->saddr, &ipv6_hdr(skb)->daddr,
 | 
				
			||||||
			 skb->dev->ifindex);
 | 
								 skb->dev->ifindex);
 | 
				
			||||||
	dst = icmp6_dst_alloc(skb->dev, NULL, &fl6);
 | 
						dst = icmp6_dst_alloc(skb->dev, &fl6);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	err = 0;
 | 
						err = 0;
 | 
				
			||||||
	if (IS_ERR(dst)) {
 | 
						if (IS_ERR(dst)) {
 | 
				
			||||||
| 
						 | 
					@ -1759,7 +1759,7 @@ static void igmp6_send(struct in6_addr *addr, struct net_device *dev, int type)
 | 
				
			||||||
	icmpv6_flow_init(sk, &fl6, type,
 | 
						icmpv6_flow_init(sk, &fl6, type,
 | 
				
			||||||
			 &ipv6_hdr(skb)->saddr, &ipv6_hdr(skb)->daddr,
 | 
								 &ipv6_hdr(skb)->saddr, &ipv6_hdr(skb)->daddr,
 | 
				
			||||||
			 skb->dev->ifindex);
 | 
								 skb->dev->ifindex);
 | 
				
			||||||
	dst = icmp6_dst_alloc(skb->dev, NULL, &fl6);
 | 
						dst = icmp6_dst_alloc(skb->dev, &fl6);
 | 
				
			||||||
	if (IS_ERR(dst)) {
 | 
						if (IS_ERR(dst)) {
 | 
				
			||||||
		err = PTR_ERR(dst);
 | 
							err = PTR_ERR(dst);
 | 
				
			||||||
		goto err_out;
 | 
							goto err_out;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -432,7 +432,6 @@ static struct sk_buff *ndisc_build_skb(struct net_device *dev,
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void ndisc_send_skb(struct sk_buff *skb, struct net_device *dev,
 | 
					static void ndisc_send_skb(struct sk_buff *skb, struct net_device *dev,
 | 
				
			||||||
			   struct neighbour *neigh,
 | 
					 | 
				
			||||||
			   const struct in6_addr *daddr,
 | 
								   const struct in6_addr *daddr,
 | 
				
			||||||
			   const struct in6_addr *saddr,
 | 
								   const struct in6_addr *saddr,
 | 
				
			||||||
			   struct icmp6hdr *icmp6h)
 | 
								   struct icmp6hdr *icmp6h)
 | 
				
			||||||
| 
						 | 
					@ -448,7 +447,7 @@ static void ndisc_send_skb(struct sk_buff *skb, struct net_device *dev,
 | 
				
			||||||
	type = icmp6h->icmp6_type;
 | 
						type = icmp6h->icmp6_type;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	icmpv6_flow_init(sk, &fl6, type, saddr, daddr, dev->ifindex);
 | 
						icmpv6_flow_init(sk, &fl6, type, saddr, daddr, dev->ifindex);
 | 
				
			||||||
	dst = icmp6_dst_alloc(dev, neigh, &fl6);
 | 
						dst = icmp6_dst_alloc(dev, &fl6);
 | 
				
			||||||
	if (IS_ERR(dst)) {
 | 
						if (IS_ERR(dst)) {
 | 
				
			||||||
		kfree_skb(skb);
 | 
							kfree_skb(skb);
 | 
				
			||||||
		return;
 | 
							return;
 | 
				
			||||||
| 
						 | 
					@ -474,7 +473,6 @@ static void ndisc_send_skb(struct sk_buff *skb, struct net_device *dev,
 | 
				
			||||||
 *	Send a Neighbour Discover packet
 | 
					 *	Send a Neighbour Discover packet
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
static void __ndisc_send(struct net_device *dev,
 | 
					static void __ndisc_send(struct net_device *dev,
 | 
				
			||||||
			 struct neighbour *neigh,
 | 
					 | 
				
			||||||
			 const struct in6_addr *daddr,
 | 
								 const struct in6_addr *daddr,
 | 
				
			||||||
			 const struct in6_addr *saddr,
 | 
								 const struct in6_addr *saddr,
 | 
				
			||||||
			 struct icmp6hdr *icmp6h, const struct in6_addr *target,
 | 
								 struct icmp6hdr *icmp6h, const struct in6_addr *target,
 | 
				
			||||||
| 
						 | 
					@ -486,7 +484,7 @@ static void __ndisc_send(struct net_device *dev,
 | 
				
			||||||
	if (!skb)
 | 
						if (!skb)
 | 
				
			||||||
		return;
 | 
							return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	ndisc_send_skb(skb, dev, neigh, daddr, saddr, icmp6h);
 | 
						ndisc_send_skb(skb, dev, daddr, saddr, icmp6h);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void ndisc_send_na(struct net_device *dev, struct neighbour *neigh,
 | 
					static void ndisc_send_na(struct net_device *dev, struct neighbour *neigh,
 | 
				
			||||||
| 
						 | 
					@ -521,8 +519,7 @@ static void ndisc_send_na(struct net_device *dev, struct neighbour *neigh,
 | 
				
			||||||
	icmp6h.icmp6_solicited = solicited;
 | 
						icmp6h.icmp6_solicited = solicited;
 | 
				
			||||||
	icmp6h.icmp6_override = override;
 | 
						icmp6h.icmp6_override = override;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	__ndisc_send(dev, neigh, daddr, src_addr,
 | 
						__ndisc_send(dev, daddr, src_addr, &icmp6h, solicited_addr,
 | 
				
			||||||
		     &icmp6h, solicited_addr,
 | 
					 | 
				
			||||||
		     inc_opt ? ND_OPT_TARGET_LL_ADDR : 0);
 | 
							     inc_opt ? ND_OPT_TARGET_LL_ADDR : 0);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -563,8 +560,7 @@ void ndisc_send_ns(struct net_device *dev, struct neighbour *neigh,
 | 
				
			||||||
		saddr = &addr_buf;
 | 
							saddr = &addr_buf;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	__ndisc_send(dev, neigh, daddr, saddr,
 | 
						__ndisc_send(dev, daddr, saddr, &icmp6h, solicit,
 | 
				
			||||||
		     &icmp6h, solicit,
 | 
					 | 
				
			||||||
		     !ipv6_addr_any(saddr) ? ND_OPT_SOURCE_LL_ADDR : 0);
 | 
							     !ipv6_addr_any(saddr) ? ND_OPT_SOURCE_LL_ADDR : 0);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -598,8 +594,7 @@ void ndisc_send_rs(struct net_device *dev, const struct in6_addr *saddr,
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
	__ndisc_send(dev, NULL, daddr, saddr,
 | 
						__ndisc_send(dev, daddr, saddr, &icmp6h, NULL,
 | 
				
			||||||
		     &icmp6h, NULL,
 | 
					 | 
				
			||||||
		     send_sllao ? ND_OPT_SOURCE_LL_ADDR : 0);
 | 
							     send_sllao ? ND_OPT_SOURCE_LL_ADDR : 0);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1203,7 +1203,6 @@ static struct dst_entry *icmp6_dst_gc_list;
 | 
				
			||||||
static DEFINE_SPINLOCK(icmp6_dst_lock);
 | 
					static DEFINE_SPINLOCK(icmp6_dst_lock);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct dst_entry *icmp6_dst_alloc(struct net_device *dev,
 | 
					struct dst_entry *icmp6_dst_alloc(struct net_device *dev,
 | 
				
			||||||
				  struct neighbour *neigh,
 | 
					 | 
				
			||||||
				  struct flowi6 *fl6)
 | 
									  struct flowi6 *fl6)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct dst_entry *dst;
 | 
						struct dst_entry *dst;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue