From 234751949b1c98f28198c6b8857d8cc1974c6e59 Mon Sep 17 00:00:00 2001 From: Claudio Jeker Date: Sat, 16 Apr 2005 21:48:22 +0000 Subject: Set F_STATIC flag earlier else the default route will end up as non-static. --- usr.sbin/ospfd/kroute.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'usr.sbin/ospfd/kroute.c') 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 @@ -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); -- cgit v1.2.3