summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorflorian <florian@openbsd.org>2019-05-11 18:10:45 +0000
committerflorian <florian@openbsd.org>2019-05-11 18:10:45 +0000
commit5f704deece6ad637a5952efc0fa88a8b54c563c4 (patch)
tree9120343d7d3ceaee6da1c03911256d7069a778f5
parentsync (diff)
downloadwireguard-openbsd-5f704deece6ad637a5952efc0fa88a8b54c563c4.tar.xz
wireguard-openbsd-5f704deece6ad637a5952efc0fa88a8b54c563c4.zip
A trunk(4) usually stays up when the link state of one of its members
changes. While we do get RTM_IFINFO messages for the (physical) member interfaces there is no indication that something changed from the trunk(4) interface. It is helpful to get this information in userland from the trunk so that userland daemons do not need to track interface membership by themselves. OK phessler
-rw-r--r--sys/net/if_trunk.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/net/if_trunk.c b/sys/net/if_trunk.c
index 994c3707467..63aa807468e 100644
--- a/sys/net/if_trunk.c
+++ b/sys/net/if_trunk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_trunk.c,v 1.139 2019/04/29 04:26:47 dlg Exp $ */
+/* $OpenBSD: if_trunk.c,v 1.140 2019/05/11 18:10:45 florian Exp $ */
/*
* Copyright (c) 2005, 2006, 2007 Reyk Floeter <reyk@openbsd.org>
@@ -33,6 +33,7 @@
#include <net/if_dl.h>
#include <net/if_media.h>
#include <net/if_types.h>
+#include <net/route.h>
#include <netinet/in.h>
#include <netinet/if_ether.h>
@@ -1211,6 +1212,7 @@ trunk_port_state(void *arg)
if (tr->tr_linkstate != NULL)
(*tr->tr_linkstate)(tp);
trunk_link_active(tr, tp);
+ rtm_ifchg(&tr->tr_ac.ac_if);
}
struct trunk_port *