summaryrefslogtreecommitdiff
path: root/usr.sbin/ospfd
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2005-04-16 21:48:22 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2005-04-16 21:48:22 +0000
commit234751949b1c98f28198c6b8857d8cc1974c6e59 (patch)
treeb4cb85c8817c5a99002b8692adf0fede4e965e5f /usr.sbin/ospfd
parent3a80527a4831c13489ff5240fb472d3445663f51 (diff)
Set F_STATIC flag earlier else the default route will end up as non-static.
Diffstat (limited to 'usr.sbin/ospfd')
-rw-r--r--usr.sbin/ospfd/kroute.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/ospfd/kroute.c b/usr.sbin/ospfd/kroute.c
index 5e6b9afe006..73804b7fd5f 100644
--- a/usr.sbin/ospfd/kroute.c
+++ b/usr.sbin/ospfd/kroute.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kroute.c,v 1.14 2005/04/12 09:54:59 claudio Exp $ */
+/* $OpenBSD: kroute.c,v 1.15 2005/04/16 21:48:21 claudio Exp $ */
/*
* Copyright (c) 2004 Esben Norby <norby@openbsd.org>
@@ -749,6 +749,8 @@ fetchtable(void)
kr->r.prefix.s_addr =
((struct sockaddr_in *)sa)->sin_addr.s_addr;
sa_in = (struct sockaddr_in *)rti_info[RTAX_NETMASK];
+ if (rtm->rtm_flags & RTF_STATIC)
+ kr->r.flags |= F_STATIC;
if (sa_in != NULL) {
if (sa_in->sin_len == 0)
break;
@@ -759,8 +761,6 @@ fetchtable(void)
else
kr->r.prefixlen =
prefixlen_classful(kr->r.prefix.s_addr);
- if (rtm->rtm_flags & RTF_STATIC)
- kr->r.flags |= F_STATIC;
break;
default:
free(kr);