summaryrefslogtreecommitdiff
path: root/sbin/route/route.c
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2008-05-06 03:44:15 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2008-05-06 03:44:15 +0000
commit60c2728fe21cc9532441ef9e7c148a77f3e018f4 (patch)
treec540f12def504d205e6912634f2dbf1aa3a128df /sbin/route/route.c
parent59da55eb67dd5d28f755f52a2b83354bf6b27a9f (diff)
Labels in the sockaddr are stored like on the wire so shift and byte swap
them. This makes route lookups work again. OK norby@
Diffstat (limited to 'sbin/route/route.c')
-rw-r--r--sbin/route/route.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/route/route.c b/sbin/route/route.c
index 4eeadce79b7..5e2d977d038 100644
--- a/sbin/route/route.c
+++ b/sbin/route/route.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: route.c,v 1.113 2008/04/28 11:36:14 norby Exp $ */
+/* $OpenBSD: route.c,v 1.114 2008/05/06 03:44:14 claudio Exp $ */
/* $NetBSD: route.c,v 1.16 1996/04/15 18:27:05 cgd Exp $ */
/*
@@ -869,10 +869,10 @@ getmplslabel(char *s, int in)
if (errstr)
errx(1, "bad label: %s is %s", s, errstr);
if (in) {
- su->smpls.smpls_in_label = htonl(label);
+ su->smpls.smpls_in_label = htonl(label << MPLS_LABEL_OFFSET);
su->smpls.smpls_in_ifindex = ifindex;
} else {
- su->smpls.smpls_out_label = htonl(label);
+ su->smpls.smpls_out_label = htonl(label << MPLS_LABEL_OFFSET);
su->smpls.smpls_out_ifindex = ifindex;
}
}