summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2013-05-30 15:44:38 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2013-05-30 15:44:38 +0000
commit9aada48d349db91dd298457115ed8f30b201ad4b (patch)
tree5181d2c193c082b88f1730cd11d64bb9d3746491 /usr.sbin
parent572ef3eb9aeb512bd0c839d57784d0a6fc9110ba (diff)
Do not use a carp address as ldp router id because it is not unique.
Pulled from ospfd. Diff from Renato Westphal [renatowestphal at gmail.com]
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ldpd/parse.y4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/ldpd/parse.y b/usr.sbin/ldpd/parse.y
index 5b86208ffad..e23b155e747 100644
--- a/usr.sbin/ldpd/parse.y
+++ b/usr.sbin/ldpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.8 2013/03/06 21:42:40 sthen Exp $ */
+/* $OpenBSD: parse.y,v 1.9 2013/05/30 15:44:37 claudio Exp $ */
/*
* Copyright (c) 2004, 2005, 2008 Esben Norby <norby@openbsd.org>
@@ -850,6 +850,8 @@ get_rtr_id(void)
fatal("getifaddrs");
for (ifa = ifap; ifa; ifa = ifa->ifa_next) {
+ if (strncmp(ifa->ifa_name, "carp", 4) == 0)
+ continue;
if (ifa->ifa_addr->sa_family != AF_INET)
continue;
cur = ((struct sockaddr_in *)ifa->ifa_addr)->sin_addr.s_addr;