From bd9d619aa5b5514b4501266f2131ef4d594687f6 Mon Sep 17 00:00:00 2001 From: norby Date: Tue, 6 May 2008 08:01:24 +0000 Subject: get rid of rtalloc, use rtalloc1 instead. ok claudio@ --- sys/netmpls/mpls_input.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'sys/netmpls/mpls_input.c') 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 @@ -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 */ -- cgit v1.2.3-59-g8ed1b