summaryrefslogtreecommitdiff
path: root/usr.sbin/ldpd/kroute.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@cvs.openbsd.org>2017-03-04 00:21:49 +0000
committerRenato Westphal <renato@cvs.openbsd.org>2017-03-04 00:21:49 +0000
commitf143cfa624bd75447244d10a6363f04101dedcd0 (patch)
treedc0a5092bfa947fdad752516398a4aeb575004fd /usr.sbin/ldpd/kroute.c
parent94c1e73a6e871bdcf3d92af851ba3809ecdeb843 (diff)
Send VPLS MAC withdrawals.
RFC 4762 says that MAC address withdrawal messages can be used to improve convergence time in VPLS networks. This patch makes ldpd send MAC withdrawals whenever a non-pseudowire interface pertaining to a VPLS goes down. The processing of received MAC withdrawals will be implemented later.
Diffstat (limited to 'usr.sbin/ldpd/kroute.c')
-rw-r--r--usr.sbin/ldpd/kroute.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/ldpd/kroute.c b/usr.sbin/ldpd/kroute.c
index 6a2f921f773..7e20c40f5c1 100644
--- a/usr.sbin/ldpd/kroute.c
+++ b/usr.sbin/ldpd/kroute.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kroute.c,v 1.64 2017/03/03 23:41:27 renato Exp $ */
+/* $OpenBSD: kroute.c,v 1.65 2017/03/04 00:21:48 renato Exp $ */
/*
* Copyright (c) 2015, 2016 Renato Westphal <renato@openbsd.org>
@@ -25,6 +25,7 @@
#include <sys/sysctl.h>
#include <arpa/inet.h>
#include <net/if_dl.h>
+#include <net/if_types.h>
#include <net/route.h>
#include <netmpls/mpls.h>
#include <errno.h>
@@ -873,6 +874,8 @@ kif_update(unsigned short ifindex, int flags, struct if_data *ifd,
kif->k.flags = flags;
kif->k.link_state = ifd->ifi_link_state;
+ if (sdl)
+ memcpy(kif->k.mac, LLADDR(sdl), sizeof(kif->k.mac));
kif->k.if_type = ifd->ifi_type;
kif->k.baudrate = ifd->ifi_baudrate;
kif->k.mtu = ifd->ifi_mtu;