LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-09-2024, 01:07 AM   #1
shrugging_face
LQ Newbie
 
Registered: Feb 2024
Posts: 1

Rep: Reputation: 0
I'm trying to add a IPv6 address to route table using "route -6 add <ipv6> reject" but ioctl fails with -1 ENODEV (No such device)


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?

Last edited by shrugging_face; 02-09-2024 at 01:03 PM.
 
Old 02-20-2024, 08:26 PM   #2
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,857

Rep: Reputation: 161Reputation: 161
> route -6 add xxxx:xxx::254 reject
A device need to be added, such as 'route -6 add xxxx:xxx::254 reject dev if'
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Not working suspend and hibernation, /dev/snapshot ENODEV z0rel Linux - Kernel 1 05-14-2019 03:12 AM
bind() fails with EADDRNOTAVAIL after calling an SIOCSIFADDR ioctl for IPV6 address lprasanna Linux - Networking 2 08-15-2011 02:29 PM
iptables(marking) + ip rule add fwmark 1 table 200 + ip route add via GW table 200 ?? amitsharma_26 Linux - Networking 9 05-26-2010 06:42 AM
ioctl: LOOP_CLR_FD: No such device or address newbie2007 Linux - Newbie 1 01-27-2008 11:19 AM
I am not able to add a new route to my route table using route command prashanth s j Linux - Networking 2 09-03-2005 04:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration