 /* Source address is 0.0.0.0 - locally generated packet that is * probably not supposed to be masqueraded. */ if (ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.ip == 0) return NF_ACCEPT; 
masquerade_target(struct sk_buff **pskb,		  const struct net_device *in,		  const struct net_device *out,		  unsigned int hooknum,		  const void *targinfo,		  void *userinfo){	struct ip_conntrack *ct;	enum ip_conntrack_info ctinfo;	const struct ip_nat_multi_range_compat *mr;	struct ip_nat_range newrange;	struct rtable *rt;	u_int32_t newsrc;	IP_NF_ASSERT(hooknum == NF_IP_POST_ROUTING);	ct = ip_conntrack_get(*pskb, &ctinfo);	IP_NF_ASSERT(ct && (ctinfo == IP_CT_NEW || ctinfo == IP_CT_RELATED	                    || ctinfo == IP_CT_RELATED + IP_CT_IS_REPLY));	mr = targinfo;	rt = (struct rtable *)(*pskb)->dst;	newsrc = inet_select_addr(out, rt->rt_gateway, RT_SCOPE_UNIVERSE);	if (!newsrc) {		printk("MASQUERADE: %s ate my IP address\n", out->name);		return NF_DROP;	}	write_lock_bh(&masq_lock);	ct->nat.masq_index = out->ifindex;	write_unlock_bh(&masq_lock);	/* Transfer from original range. */	newrange = ((struct ip_nat_range)		{ mr->range[0].flags | IP_NAT_RANGE_MAP_IPS,		  newsrc, newsrc,		  mr->range[0].min, mr->range[0].max });	/* Hand modified range to generic setup. */	return ip_nat_setup_info(ct, &newrange, hooknum);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/adcb5ad1e5ba3996d53a047c5486efa6e734b413/ipt_MASQUERADE.c/clean/net/ipv4/netfilter/ipt_MASQUERADE.c