diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2014-09-27 12:26:17 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2014-09-27 12:26:17 +0000 |
commit | 2f6640143002b6320ac586e0c3018c39fc804901 (patch) | |
tree | 6733392d8818567dcf4cc1683f1b16a202bbfd58 /sys/netinet6/ip6_forward.c | |
parent | c43fd67b83d72fb5483ae3b81d1972645c2f7f2f (diff) |
Kill rtalloc() and update rtalloc1() and rtalloc_mpath() to no longer
rely on "struct route" that should die.
ok claudio@
Diffstat (limited to 'sys/netinet6/ip6_forward.c')
-rw-r--r-- | sys/netinet6/ip6_forward.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/sys/netinet6/ip6_forward.c b/sys/netinet6/ip6_forward.c index cc66b458123..70513db5259 100644 --- a/sys/netinet6/ip6_forward.c +++ b/sys/netinet6/ip6_forward.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip6_forward.c,v 1.67 2014/06/03 13:32:24 mpi Exp $ */ +/* $OpenBSD: ip6_forward.c,v 1.68 2014/09/27 12:26:16 mpi Exp $ */ /* $KAME: ip6_forward.c,v 1.75 2001/06/29 12:42:13 jinmei Exp $ */ /* @@ -250,8 +250,10 @@ reroute: } /* this probably fails but give it a try again */ ip6_forward_rt.ro_tableid = rtableid; - rtalloc_mpath((struct route *)&ip6_forward_rt, - &ip6->ip6_src.s6_addr32[0]); + ip6_forward_rt.ro_rt = rtalloc_mpath( + sin6tosa(&ip6_forward_rt.ro_dst), + &ip6->ip6_src.s6_addr32[0], + ip6_forward_rt.ro_tableid); } if (ip6_forward_rt.ro_rt == 0) { @@ -277,9 +279,10 @@ reroute: dst->sin6_family = AF_INET6; dst->sin6_addr = ip6->ip6_dst; ip6_forward_rt.ro_tableid = rtableid; - - rtalloc_mpath((struct route *)&ip6_forward_rt, - &ip6->ip6_src.s6_addr32[0]); + ip6_forward_rt.ro_rt = rtalloc_mpath( + sin6tosa(&ip6_forward_rt.ro_dst), + &ip6->ip6_src.s6_addr32[0], + ip6_forward_rt.ro_tableid); if (ip6_forward_rt.ro_rt == 0) { ip6stat.ip6s_noroute++; |