Re: [PATCH net-next 2/3] ipvs: add function to find tunnels

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



	Hello,

On Wed, 3 Apr 2019, Simon Horman wrote:

> On Sun, Mar 31, 2019 at 01:26:20PM +0300, Julian Anastasov wrote:
> 
> > diff --git a/net/netfilter/ipvs/ip_vs_core.c b/net/netfilter/ipvs/ip_vs_core.c
> > index 14457551bcb4..4447ee512b88 100644
> > --- a/net/netfilter/ipvs/ip_vs_core.c
> > +++ b/net/netfilter/ipvs/ip_vs_core.c
> > @@ -1598,6 +1598,7 @@ ip_vs_in_icmp(struct netns_ipvs *ipvs, struct sk_buff *skb, int *related,
> >  	struct ip_vs_proto_data *pd;
> >  	unsigned int offset, offset2, ihl, verdict;
> >  	bool ipip, new_cp = false;
> > +	union nf_inet_addr *raddr;
> >  
> >  	*related = 1;
> >  
> > @@ -1636,15 +1637,22 @@ ip_vs_in_icmp(struct netns_ipvs *ipvs, struct sk_buff *skb, int *related,
> >  	cih = skb_header_pointer(skb, offset, sizeof(_ciph), &_ciph);
> >  	if (cih == NULL)
> >  		return NF_ACCEPT; /* The packet looks wrong, ignore */
> > +	raddr = (union nf_inet_addr *)&cih->daddr;
> 
> Hi Julian,
> 
> 	Could we consider the following instead of casting?
> 
> 	union nf_inet_addr raddr;
> 
> 	...
> 
> 	raddr.ip = cih->daddr;

	It was my initial option but then I decided to reduce the
stack usage

Regards

--
Julian Anastasov <ja@xxxxxx>



[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux