summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormichele <michele@openbsd.org>2009-01-28 22:19:53 +0000
committermichele <michele@openbsd.org>2009-01-28 22:19:53 +0000
commitd1912e015b1d0c90ce61f61181c0ef74b41b6d69 (patch)
tree1c46d06633d6545ac38f0b723acf6a2044fe5dc7
parentGet rid of the ugly rtentry hack. (diff)
downloadwireguard-openbsd-d1912e015b1d0c90ce61f61181c0ef74b41b6d69.tar.xz
wireguard-openbsd-d1912e015b1d0c90ce61f61181c0ef74b41b6d69.zip
Reflect MPLS kernel changes.
-rw-r--r--sbin/route/route.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sbin/route/route.c b/sbin/route/route.c
index a49967cb88b..97e644c076f 100644
--- a/sbin/route/route.c
+++ b/sbin/route/route.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: route.c,v 1.124 2009/01/08 12:52:35 michele Exp $ */
+/* $OpenBSD: route.c,v 1.125 2009/01/28 22:19:53 michele Exp $ */
/* $NetBSD: route.c,v 1.16 1996/04/15 18:27:05 cgd Exp $ */
/*
@@ -393,8 +393,6 @@ newroute(int argc, char **argv)
case K_OUT:
if (!--argc)
usage(1+*argv);
- if (af != AF_MPLS)
- errx(1, "-out requires -mpls");
getmplslabel(*++argv, 0);
break;
case K_POP:
@@ -894,8 +892,8 @@ getmplslabel(char *s, int in)
su->smpls.smpls_label = htonl(label << MPLS_LABEL_OFFSET);
}
- su->sa.sa_len = aflen;
- su->sa.sa_family = af;
+ su->sa.sa_len = sizeof(struct sockaddr_mpls);
+ su->sa.sa_family = AF_MPLS;
}
int