From: tobhe Date: Fri, 26 Feb 2021 21:06:02 +0000 (+0000) Subject: Set RTF_GATEWAY for flow routes, not for host route. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=f3bb3f7eef0ec8a83070d1f1682cc3e399bb8763;p=openbsd Set RTF_GATEWAY for flow routes, not for host route. --- diff --git a/sbin/iked/vroute.c b/sbin/iked/vroute.c index e4e47f3eccc..ebba6b91716 100644 --- a/sbin/iked/vroute.c +++ b/sbin/iked/vroute.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vroute.c,v 1.3 2021/02/26 20:22:11 tobhe Exp $ */ +/* $OpenBSD: vroute.c,v 1.4 2021/02/26 21:06:02 tobhe Exp $ */ /* * Copyright (c) 2021 Tobias Heider @@ -238,7 +238,7 @@ vroute_getroute(struct iked *env, struct imsg *imsg) left -= dest->sa_len; addrs |= RTA_DST; - flags = RTF_UP | RTF_STATIC; + flags = RTF_UP | RTF_GATEWAY | RTF_STATIC; if (left != 0) { if (left < sizeof(struct sockaddr)) return (-1); @@ -312,7 +312,7 @@ vroute_getcloneroute(struct iked *env, struct imsg *imsg) left -= dst->sa_len; /* Get route to peer */ - flags = RTF_UP | RTF_GATEWAY | RTF_HOST | RTF_STATIC; + flags = RTF_UP | RTF_HOST | RTF_STATIC; if (vroute_doroute(env, flags, RTA_DST, rdomain, RTM_GET, (struct sockaddr *)&dest, (struct sockaddr *)&mask, (struct sockaddr *)&addr))