diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2017-11-29 19:40:48 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2017-11-29 19:40:48 +0000 |
commit | 2bee4fdd4cab756be6c0a5119906f1c116df7824 (patch) | |
tree | b7f4b7fd27364e386a1734a4da409ccc8326b1d1 /usr.sbin/bgpd | |
parent | 7b7421b074c872b992ce89edf8b921dddd3a4796 (diff) |
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@
Diffstat (limited to 'usr.sbin/bgpd')
-rw-r--r-- | usr.sbin/bgpd/kroute.c | 4 |
1 files changed, 3 insertions, 1 deletions
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 <henning@openbsd.org> @@ -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); |