summaryrefslogtreecommitdiffstats
path: root/sys/netinet
diff options
context:
space:
mode:
authoryasuoka <yasuoka@openbsd.org>2020-07-28 16:44:34 +0000
committeryasuoka <yasuoka@openbsd.org>2020-07-28 16:44:34 +0000
commitacebc66c78d758312f747d7611dc6ba8f7916c61 (patch)
treed68bd5cc14d799b9ba2862c857970f9c4f73ddbe /sys/netinet
parentFix a problem related to isochronous transfers appearing in certain (diff)
downloadwireguard-openbsd-acebc66c78d758312f747d7611dc6ba8f7916c61.tar.xz
wireguard-openbsd-acebc66c78d758312f747d7611dc6ba8f7916c61.zip
Don't treat an error if carppeer is an unicast and the peer is down.
ok kn
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/ip_carp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c
index 31796089b90..0d52cffa606 100644
--- a/sys/netinet/ip_carp.c
+++ b/sys/netinet/ip_carp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_carp.c,v 1.348 2020/07/28 09:22:37 bluhm Exp $ */
+/* $OpenBSD: ip_carp.c,v 1.349 2020/07/28 16:44:34 yasuoka Exp $ */
/*
* Copyright (c) 2002 Michael Shalayeff. All rights reserved.
@@ -1140,7 +1140,9 @@ carp_send_ad(struct carp_vhost_entry *vhe)
error = ip_output(m, NULL, NULL, IP_RAWOUTPUT, &sc->sc_imo,
NULL, 0);
- if (error) {
+ if (error &&
+ /* when unicast, the peer's down is not our fault */
+ !(!IN_MULTICAST(sc->sc_peer.s_addr) && error == EHOSTDOWN)){
if (error == ENOBUFS)
carpstat_inc(carps_onomem);
else