From f3bb3f7eef0ec8a83070d1f1682cc3e399bb8763 Mon Sep 17 00:00:00 2001 From: tobhe Date: Fri, 26 Feb 2021 21:06:02 +0000 Subject: [PATCH] Set RTF_GATEWAY for flow routes, not for host route. --- sbin/iked/vroute.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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)) -- 2.20.1