summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorEsben Norby <norby@cvs.openbsd.org>2008-05-06 08:01:25 +0000
committerEsben Norby <norby@cvs.openbsd.org>2008-05-06 08:01:25 +0000
commit066c7b9f8d4d7580b8870b49dd4eccf34a853056 (patch)
tree068085ecb361ce0634a9928c2107b087a00d03ce /sys
parenta35b5ed70d244df74d394471bb0395fa6776fd57 (diff)
get rid of rtalloc, use rtalloc1 instead.
ok claudio@
Diffstat (limited to 'sys')
-rw-r--r--sys/netmpls/mpls_input.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/netmpls/mpls_input.c b/sys/netmpls/mpls_input.c
index d17c245c0a3..d92ceac9fc7 100644
--- a/sys/netmpls/mpls_input.c
+++ b/sys/netmpls/mpls_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mpls_input.c,v 1.7 2008/05/06 02:47:20 norby Exp $ */
+/* $OpenBSD: mpls_input.c,v 1.8 2008/05/06 08:01:24 norby Exp $ */
/*
* Copyright (c) 2008 Claudio Jeker <claudio@openbsd.org>
@@ -67,9 +67,9 @@ mplsintr(void)
void
mpls_input(struct mbuf *m)
{
- struct route ro;
struct ifnet *ifp = m->m_pkthdr.rcvif;
struct sockaddr_mpls *smpls;
+ struct sockaddr_mpls sa_mpls;
struct shim_hdr *shim;
struct rtentry *rt = NULL;
u_int32_t ttl;
@@ -114,8 +114,8 @@ mpls_input(struct mbuf *m)
goto done;
}
- bzero(&ro, sizeof(ro));
- smpls = satosmpls(&ro.ro_dst);
+ bzero(&sa_mpls, sizeof(sa_mpls));
+ smpls = &sa_mpls;
smpls->smpls_family = AF_MPLS;
smpls->smpls_len = sizeof(*smpls);
smpls->smpls_in_ifindex = ifp->if_index;
@@ -126,8 +126,7 @@ mpls_input(struct mbuf *m)
MPLS_LABEL_GET(smpls->smpls_in_label),
smpls->smpls_in_ifindex);
- rtalloc(&ro); /* XXX switch to rtalloc1() */
- rt = ro.ro_rt;
+ rt = rtalloc1(smplstosa(smpls),1, 0);
if (rt == NULL) {
/* no entry for this label */