From 19c4042f1eb0b06506e1ad7e32012c4cfddc1ade Mon Sep 17 00:00:00 2001 From: Tore Anderson Date: Mon, 20 May 2019 09:13:05 +0200 Subject: [PATCH] Strip prefix length before route lookup for $plat_prefix Recent Linux kernels have removed the ability to do a `ip -6 route get` lookup for destinations with a prefix length: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0eff0a274104487938d741b5c37aca1795afd184 Strip the prefix length before doing this lookup, so that it is done for the first address in `$plat_prefix` instead. Closes #12. --- clatd | 1 + 1 file changed, 1 insertion(+) diff --git a/clatd b/clatd index d27e052..19be234 100755 --- a/clatd +++ b/clatd @@ -393,6 +393,7 @@ sub get_plat_dev { if(!$plat_prefix) { err("get_plat_dev(): No PLAT prefix to work with"); } + $plat_prefix =~ s|/\d+$||; open(my $fd, '-|', cfg("cmd-ip"), qw(-6 route get), $plat_prefix) or err("get_plat_dev(): 'ip -6 route get $plat_prefix' failed to execute"); while(<$fd>) {