From: claudio Date: Wed, 29 Nov 2017 19:40:47 +0000 (+0000) Subject: Insert MPLS VPN routes with the RTF_GATEWAY flag cleared. mpe(4) is now X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=259fbce4813c8e11ea78872107eabe07592cbf11;p=openbsd Insert MPLS VPN routes with the RTF_GATEWAY flag cleared. mpe(4) is now expecting this and will use the route gateway and the mpls label to forward packets. This plus the other diffs to if_mpe.c and route.c should fix L3 MPLS VPNs. Problem reported by henning@ --- diff --git a/usr.sbin/bgpd/kroute.c b/usr.sbin/bgpd/kroute.c index d885fe50f56..53dc857dd6f 100644 --- a/usr.sbin/bgpd/kroute.c +++ b/usr.sbin/bgpd/kroute.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kroute.c,v 1.216 2017/07/24 11:00:01 friehm Exp $ */ +/* $OpenBSD: kroute.c,v 1.217 2017/11/29 19:40:47 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer @@ -2644,6 +2644,8 @@ send_rtmsg(int fd, int action, struct ktable *kt, struct kroute *kroute, hdr.rtm_mpls = MPLS_OP_PUSH; hdr.rtm_addrs |= RTA_SRC; hdr.rtm_msglen += sizeof(mpls); + /* clear gateway flag since this is for mpe(4) */ + hdr.rtm_flags &= ~RTF_GATEWAY; /* adjust iovec */ iov[iovcnt].iov_base = &mpls; iov[iovcnt++].iov_len = sizeof(mpls);