if (!(nlhdr->nlmsg_flags&NLM_F_CREATE)) 
if (!(nlhdr->nlmsg_flags & NLM_F_CREATE)) 
fn_trie_insert(struct fib_table *tb, struct rtmsg *r, struct kern_rta *rta,	       struct nlmsghdr *nlhdr, struct netlink_skb_parms *req){	struct trie *t = (struct trie *) tb->tb_data;	struct fib_alias *fa, *new_fa;	struct list_head *fa_head = NULL;	struct fib_info *fi;	int plen = r->rtm_dst_len;	int type = r->rtm_type;	u8 tos = r->rtm_tos;	u32 key, mask;	int err;	struct leaf *l;	if (plen > 32)		return -EINVAL;	key = 0;	if (rta->rta_dst)		memcpy(&key, rta->rta_dst, 4);	key = ntohl(key);	if (trie_debug)		printk("Insert table=%d %08x/%d\n", tb->tb_id, key, plen);	mask = ntohl( inet_make_mask(plen) );	if (key & ~mask)		return -EINVAL;	key = key & mask;	if  ((fi = fib_create_info(r, rta, nlhdr, &err)) == NULL)		goto err;	l = fib_find_node(t, key);	fa = NULL;	if (l) {		fa_head = get_fa_head(l, plen);		fa = fib_find_alias(fa_head, tos, fi->fib_priority);	}	/* Now fa, if non-NULL, points to the first fib alias	 * with the same keys [prefix,tos,priority], if such key already	 * exists or to the node before which we will insert new one.	 *	 * If fa is NULL, we will need to allocate a new one and	 * insert to the head of f.	 *	 * If f is NULL, no fib node matched the destination key	 * and we need to allocate a new one of those as well.	 */	if (fa &&	    fa->fa_info->fib_priority == fi->fib_priority) {		struct fib_alias *fa_orig;		err = -EEXIST;		if (nlhdr->nlmsg_flags & NLM_F_EXCL)			goto out;		if (nlhdr->nlmsg_flags & NLM_F_REPLACE) {			struct fib_info *fi_drop;			u8 state;			write_lock_bh(&fib_lock);			fi_drop = fa->fa_info;			fa->fa_info = fi;			fa->fa_type = type;			fa->fa_scope = r->rtm_scope;			state = fa->fa_state;			fa->fa_state &= ~FA_S_ACCESSED;			write_unlock_bh(&fib_lock);			fib_release_info(fi_drop);			if (state & FA_S_ACCESSED)			  rt_cache_flush(-1);			    goto succeeded;		}		/* Error if we find a perfect match which		 * uses the same scope, type, and nexthop		 * information.		 */		fa_orig = fa;		list_for_each_entry(fa, fa_orig->fa_list.prev, fa_list) {			if (fa->fa_tos != tos)				break;			if (fa->fa_info->fib_priority != fi->fib_priority)				break;			if (fa->fa_type == type &&			    fa->fa_scope == r->rtm_scope &&			    fa->fa_info == fi) {				goto out;			}		}		if (!(nlhdr->nlmsg_flags & NLM_F_APPEND))			fa = fa_orig;	}	err = -ENOENT;	if (!(nlhdr->nlmsg_flags&NLM_F_CREATE))		goto out;	err = -ENOBUFS;	new_fa = kmem_cache_alloc(fn_alias_kmem, SLAB_KERNEL);	if (new_fa == NULL)		goto out;	new_fa->fa_info = fi;	new_fa->fa_tos = tos;	new_fa->fa_type = type;	new_fa->fa_scope = r->rtm_scope;	new_fa->fa_state = 0;#if 0	new_fa->dst = NULL;#endif	/*	 * Insert new entry to the list.	 */	if (!fa_head) {		fa_head = fib_insert_node(t, &err, key, plen);		err = 0;		if (err)			goto out_free_new_fa;	}	write_lock_bh(&fib_lock);	list_add_tail(&new_fa->fa_list,		 (fa ? &fa->fa_list : fa_head));	write_unlock_bh(&fib_lock);	rt_cache_flush(-1);	rtmsg_fib(RTM_NEWROUTE, htonl(key), new_fa, plen, tb->tb_id, nlhdr, req);succeeded:	return 0;out_free_new_fa:	kmem_cache_free(fn_alias_kmem, new_fa);out:	fib_release_info(fi);err:;	return err;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/91b9a277fc4d207249e459a455abf804ebb5499d/fib_trie.c/buggy/net/ipv4/fib_trie.c