summaryrefslogtreecommitdiff
path: root/usr.sbin/ospf6d
diff options
context:
space:
mode:
authorChris Cappuccio <chris@cvs.openbsd.org>2009-06-05 22:40:25 +0000
committerChris Cappuccio <chris@cvs.openbsd.org>2009-06-05 22:40:25 +0000
commit4e9d97f9bd4bf6ffea35c2fc1c968806bab268a6 (patch)
tree8dd99e6c5ab1c033916b198c7678a4a083f2aa9e /usr.sbin/ospf6d
parent637897ed02de73e77d8087fcaf4bb06dfca62df0 (diff)
rtm->rtm_hdrlen conversion
ok claudio@, henning@
Diffstat (limited to 'usr.sbin/ospf6d')
-rw-r--r--usr.sbin/ospf6d/kroute.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/ospf6d/kroute.c b/usr.sbin/ospf6d/kroute.c
index 85fb89578af..28668b861dd 100644
--- a/usr.sbin/ospf6d/kroute.c
+++ b/usr.sbin/ospf6d/kroute.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kroute.c,v 1.11 2009/04/09 19:03:10 stsp Exp $ */
+/* $OpenBSD: kroute.c,v 1.12 2009/06/05 22:40:24 chris Exp $ */
/*
* Copyright (c) 2004 Esben Norby <norby@openbsd.org>
@@ -1070,7 +1070,7 @@ fetchtable(void)
rtm = (struct rt_msghdr *)next;
if (rtm->rtm_version != RTM_VERSION)
continue;
- sa = (struct sockaddr *)(rtm + 1);
+ sa = (struct sockaddr *)(next + rtm->rtm_hdrlen);
get_rtaddrs(rtm->rtm_addrs, sa, rti_info);
if ((sa = rti_info[RTAX_DST]) == NULL)
@@ -1260,7 +1260,7 @@ dispatch_rtmsg(void)
if (rtm->rtm_type == RTM_ADD || rtm->rtm_type == RTM_CHANGE ||
rtm->rtm_type == RTM_DELETE) {
- sa = (struct sockaddr *)(rtm + 1);
+ sa = (struct sockaddr *)(next + rtm->rtm_hdrlen);
get_rtaddrs(rtm->rtm_addrs, sa, rti_info);
if (rtm->rtm_tableid != 0)