Hello,

Gert Doering, on Tue 09 Feb 2016 10:28:21 +0100, wrote:
> Alternatively, using
> --learn-address might actually be much easier than --client-connect, as
> it will already tell you which networks are "new for this client" - from
> the description, I'm fairly sure it handles iroute/iroute-ipv6 as well,
> but for whatever reason I've never actually used this combination...

That works indeed:

#!/bin/bash

add_del="$1"
route="$2"
cname="$3"

case "$route" in 
        *:*) six=-6 ;;
        *)   six="" ;;
esac

if [ -n "$dev" ]
then
  device="dev $dev"
else
  device=""
fi

ip $six route "$add_del" "$route" $device

Samuel

Reply via email to