Deleted Added
full compact
radix_mpath.c (178454) radix_mpath.c (178888)
1/* $KAME: radix_mpath.c,v 1.17 2004/11/08 10:29:39 itojun Exp $ */
2
3/*
4 * Copyright (C) 2001 WIDE Project.
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 20 unchanged lines hidden (view full) ---

29 * SUCH DAMAGE.
30 * THE AUTHORS DO NOT GUARANTEE THAT THIS SOFTWARE DOES NOT INFRINGE
31 * ANY OTHERS' INTELLECTUAL PROPERTIES. IN NO EVENT SHALL THE AUTHORS
32 * BE LIABLE FOR ANY INFRINGEMENT OF ANY OTHERS' INTELLECTUAL
33 * PROPERTIES.
34 */
35
36#include <sys/cdefs.h>
1/* $KAME: radix_mpath.c,v 1.17 2004/11/08 10:29:39 itojun Exp $ */
2
3/*
4 * Copyright (C) 2001 WIDE Project.
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 20 unchanged lines hidden (view full) ---

29 * SUCH DAMAGE.
30 * THE AUTHORS DO NOT GUARANTEE THAT THIS SOFTWARE DOES NOT INFRINGE
31 * ANY OTHERS' INTELLECTUAL PROPERTIES. IN NO EVENT SHALL THE AUTHORS
32 * BE LIABLE FOR ANY INFRINGEMENT OF ANY OTHERS' INTELLECTUAL
33 * PROPERTIES.
34 */
35
36#include <sys/cdefs.h>
37__FBSDID("$FreeBSD: head/sys/net/radix_mpath.c 178454 2008-04-24 05:04:52Z qingli $");
37__FBSDID("$FreeBSD: head/sys/net/radix_mpath.c 178888 2008-05-09 23:03:00Z julian $");
38
39#include "opt_inet6.h"
40
41#include <sys/param.h>
42#include <sys/systm.h>
43#include <sys/malloc.h>
44#include <sys/socket.h>
45#include <sys/domain.h>

--- 204 unchanged lines hidden (view full) ---

250 return EEXIST;
251 } while ((rn1 = rn_mpath_next(rn1)) != NULL);
252
253different:
254 return 0;
255}
256
257void
38
39#include "opt_inet6.h"
40
41#include <sys/param.h>
42#include <sys/systm.h>
43#include <sys/malloc.h>
44#include <sys/socket.h>
45#include <sys/domain.h>

--- 204 unchanged lines hidden (view full) ---

250 return EEXIST;
251 } while ((rn1 = rn_mpath_next(rn1)) != NULL);
252
253different:
254 return 0;
255}
256
257void
258rtalloc_mpath(struct route *ro, int hash)
258rtalloc_mpath_fib(struct route *ro, int hash, u_int fibnum)
259{
260 struct radix_node *rn0, *rn;
261 int n;
262
263 /*
264 * XXX we don't attempt to lookup cached route again; what should
265 * be done for sendto(3) case?
266 */
267 if (ro->ro_rt && ro->ro_rt->rt_ifp && (ro->ro_rt->rt_flags & RTF_UP))
268 return; /* XXX */
259{
260 struct radix_node *rn0, *rn;
261 int n;
262
263 /*
264 * XXX we don't attempt to lookup cached route again; what should
265 * be done for sendto(3) case?
266 */
267 if (ro->ro_rt && ro->ro_rt->rt_ifp && (ro->ro_rt->rt_flags & RTF_UP))
268 return; /* XXX */
269 ro->ro_rt = rtalloc1(&ro->ro_dst, 1, 0UL);
269 ro->ro_rt = rtalloc1_fib(&ro->ro_dst, 1, 0UL, fibnum);
270
271 /* if the route does not exist or it is not multipath, don't care */
272 if (ro->ro_rt == NULL)
273 return;
274 if (rn_mpath_next((struct radix_node *)ro->ro_rt) == NULL) {
275 RT_UNLOCK(ro->ro_rt);
276 return;
277 }

--- 63 unchanged lines hidden ---
270
271 /* if the route does not exist or it is not multipath, don't care */
272 if (ro->ro_rt == NULL)
273 return;
274 if (rn_mpath_next((struct radix_node *)ro->ro_rt) == NULL) {
275 RT_UNLOCK(ro->ro_rt);
276 return;
277 }

--- 63 unchanged lines hidden ---