Hello,
I'm trying to run the following command but I see SIOGIFINDEX: No such device error.
Code:
route -6 add xxxx:xxx::254 reject
SIOGIFINDEX: No such device
ip route works just fine btw
Code:
ip -6 route add prohibit xxxx:xxx::254
When I look at strace "route -6 add" command, I see the following ioctl call
Code:
socket(AF_INET6, SOCK_DGRAM, IPPROTO_IP) = 3
ioctl(3, SIOCGIFINDEX, {ifr_name="reject"}) = -1 ENODEV (No such device)
According to ioctl documentation, SIOCGIFINDEX retrieves ifr_ifindex but from the above strace, ioctl does not seem to be receiving ifindex , it's just ifr_name?
Code:
SIOCGIFINDEX
Retrieve the interface index of the interface into
ifr_ifindex.
Am I missing something in my command to let it correctly parse the ipv6 config for ioctl?