summaryrefslogtreecommitdiff
path: root/drivers/net/ovpn/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ovpn/main.c')
-rw-r--r--drivers/net/ovpn/main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/ovpn/main.c b/drivers/net/ovpn/main.c
index 0acb0934c1be..1bb1afe766a4 100644
--- a/drivers/net/ovpn/main.c
+++ b/drivers/net/ovpn/main.c
@@ -157,6 +157,11 @@ static void ovpn_setup(struct net_device *dev)
dev->type = ARPHRD_NONE;
dev->flags = IFF_POINTOPOINT | IFF_NOARP;
dev->priv_flags |= IFF_NO_QUEUE;
+ /* when routing packets to a LAN behind a client, we rely on the
+ * route entry that originally brought the packet into ovpn, so
+ * don't release it
+ */
+ netif_keep_dst(dev);
dev->lltx = true;
dev->features |= feat;