[Openvpn-devel,v1] route: initialize the table of block-local routes

Message ID 20261121144850.26734-1-gert@greenie.muc.de
State New
Headers
Series [Openvpn-devel,v1] route: initialize the table of block-local routes |

Commit Message

Gert Doering Nov. 21, 2026, 2:48 p.m. UTC
  From: Razvan Cojocaru <razvanc@mailbox.org>

add_block_local_item() allocates the routes without clearing them and
left table_id unset, so the routes went to a garbage table. Use 0, the
default table, like the other internal routes.

Change-Id: I1d516b1acee3edc2a69c670d62f49e3cd34d6dc7
Signed-off-by: Razvan Cojocaru <razvanc@mailbox.org>
Acked-by: Gert Doering <gert@greenie.muc.de>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2227
---

This change was reviewed on Gerrit and approved by at least one
developer. I request to merge it to release/2.7.

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2227
This mail reflects revision 1 of this Change.

Acked-by according to Gerrit (reflected above):
Gert Doering <gert@greenie.muc.de>
  

Patch

diff --git a/src/openvpn/route.c b/src/openvpn/route.c
index 4dfdd5f..5b1d012 100644
--- a/src/openvpn/route.c
+++ b/src/openvpn/route.c
@@ -557,6 +557,7 @@ 
         /* split a route into two smaller blocking routes, and direct them to target */
         l2 = ((~gateway->netmask) + 1) >> 1;
         r1->flags = RT_DEFINED;
+        r1->table_id = 0;
         r1->gateway = target;
         r1->network = gateway->addr & gateway->netmask;
         r1->netmask = ~(l2 - 1);