summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2011-07-04 22:48:32 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2011-07-04 22:48:32 +0000
commitdd89199737193e8dee91e0348f7824de597b7e0a (patch)
treea2369b7fc947e8bc7a4ac48c34038c7e31b7414e
parent46d45a4320892c10cfb753a35e05bd28ac062982 (diff)
Force the sa_len to sizeof(struct sockaddr_dl) before calling
link_addr() since the function looks at sa_len internally. This should solve issues with using -ifp modifier because the aflen was often to small.
-rw-r--r--sbin/route/route.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sbin/route/route.c b/sbin/route/route.c
index 701e31306b0..d543cc43866 100644
--- a/sbin/route/route.c
+++ b/sbin/route/route.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: route.c,v 1.154 2011/07/02 22:00:54 claudio Exp $ */
+/* $OpenBSD: route.c,v 1.155 2011/07/04 22:48:31 claudio Exp $ */
/* $NetBSD: route.c,v 1.16 1996/04/15 18:27:05 cgd Exp $ */
/*
@@ -865,6 +865,7 @@ getaddr(int which, char *s, struct hostent **hpp)
}
case AF_LINK:
+ su->sa.sa_len = sizeof(struct sockaddr_dl);
link_addr(s, &su->sdl);
return (1);
case AF_MPLS: