I'm trying to add a IPv5 address to route table using "route -6 add <ipv6> reject" but ioctl fails with -1 ENODEV (No such device)
by shrugging_face from LinuxQuestions.org on (#6JGDQ)
EDIT: There's a typo in the title, it's supposed to be ipv6
Hello,
I'm trying to run the following command but I see SIOGIFINDEX: No such device error.
Code:route -6 add fd00:ec2::254 reject
SIOGIFINDEX: No such deviceip route works just fine btw
Code:ip -6 route add prohibit fd00:ec2::254When 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?
Hello,
I'm trying to run the following command but I see SIOGIFINDEX: No such device error.
Code:route -6 add fd00:ec2::254 reject
SIOGIFINDEX: No such deviceip route works just fine btw
Code:ip -6 route add prohibit fd00:ec2::254When 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?