summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/bgpd/config.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/bgpd/config.c b/usr.sbin/bgpd/config.c
index 49888fbd7a2..e7c7d1f4383 100644
--- a/usr.sbin/bgpd/config.c
+++ b/usr.sbin/bgpd/config.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: config.c,v 1.50 2007/10/13 16:35:20 deraadt Exp $ */
+/* $OpenBSD: config.c,v 1.51 2009/01/26 23:10:02 claudio Exp $ */
/*
* Copyright (c) 2003, 2004, 2005 Henning Brauer <henning@openbsd.org>
@@ -145,7 +145,7 @@ get_bgpid(void)
cur = ((struct sockaddr_in *)ifa->ifa_addr)->sin_addr.s_addr;
if ((cur & localnet) == localnet) /* skip 127/8 */
continue;
- if (cur > ip)
+ if (ntohl(cur) > ntohl(ip))
ip = cur;
}
freeifaddrs(ifap);