get rid of unused variable/assignments
This commit is contained in:
parent
230dbce18d
commit
a9e39e843e
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mpls_routes.c,v 1.4 2011/02/09 11:38:57 kefren Exp $ */
|
||||
/* $NetBSD: mpls_routes.c,v 1.5 2011/02/14 11:43:59 kefren Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2010 The NetBSD Foundation, Inc.
|
||||
@ -635,25 +635,23 @@ check_route(struct rt_msg * rg, uint rlen)
|
||||
*/
|
||||
|
||||
/* First of all check if we already know this one */
|
||||
lab = label_get(so_dest, so_pref);
|
||||
if (!lab) {
|
||||
if (label_get(so_dest, so_pref) == NULL) {
|
||||
if (!(rg->m_rtm.rtm_flags & RTF_GATEWAY))
|
||||
lab = label_add(so_dest, so_pref, NULL,
|
||||
label_add(so_dest, so_pref, NULL,
|
||||
MPLS_LABEL_IMPLNULL, NULL, 0);
|
||||
else {
|
||||
pm = ldp_test_mapping(&so_dest->sin.sin_addr,
|
||||
prefixlen, &so_gate->sin.sin_addr);
|
||||
if (pm) {
|
||||
lab = label_add(so_dest, so_pref,
|
||||
label_add(so_dest, so_pref,
|
||||
so_gate, 0, NULL, 0);
|
||||
mpls_add_label(pm->peer, rg,
|
||||
&so_dest->sin.sin_addr, prefixlen,
|
||||
pm->lm->label, ROUTE_LOOKUP_LOOP);
|
||||
free(pm);
|
||||
} else
|
||||
lab = label_add(so_dest, so_pref,
|
||||
so_gate, MPLS_LABEL_IMPLNULL,
|
||||
NULL, 0);
|
||||
label_add(so_dest, so_pref, so_gate,
|
||||
MPLS_LABEL_IMPLNULL, NULL, 0);
|
||||
}
|
||||
} else /* We already know about this prefix */
|
||||
debugp("Binding already there for prefix %s/%d !\n",
|
||||
@ -728,7 +726,6 @@ bind_current_routes()
|
||||
char *buf, *next, *lim;
|
||||
struct rt_msghdr *rtmes;
|
||||
union sockunion *so_dst, *so_pref, *so_gate;
|
||||
struct label *lab;
|
||||
|
||||
mib[0] = CTL_NET;
|
||||
mib[1] = PF_ROUTE;
|
||||
@ -812,7 +809,7 @@ bind_current_routes()
|
||||
continue;
|
||||
}
|
||||
if (so_gate->sa.sa_family == AF_INET)
|
||||
lab = label_add(so_dst, so_pref, so_gate,
|
||||
label_add(so_dst, so_pref, so_gate,
|
||||
MPLS_LABEL_IMPLNULL, NULL, 0);
|
||||
|
||||
if (rtmes->rtm_flags & RTF_HOST)
|
||||
|
Loading…
Reference in New Issue
Block a user