You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to create a VLAN sub-interface with an associated macvlan passthru interface to move into a new netns using pyroute2. I am able to successfully create both the vlan and sub-interface, but I am only able to move the VLAN interface into the new netns. Here is example code:
Traceback (most recent call last):
File "./test.py", line 108, in <module>
createSubVLAN()
File "./test.py", line 103, in createSubVLAN
child_if.up().commit()
File "/usr/local/lib/python2.7/dist-packages/pyroute2/ipdb/interfaces.py", line 572, in commit
self.nl.link('add', **request)
File "/usr/local/lib/python2.7/dist-packages/pyroute2/iproute.py", line 1310, in link
msg_flags=msg_flags)
File "/usr/local/lib/python2.7/dist-packages/pyroute2/netlink/nlsocket.py", line 804, in nlm_request
return do_try()
File "/usr/local/lib/python2.7/dist-packages/pyroute2/netlink/nlsocket.py", line 783, in do_try
callback=callback)
File "/usr/local/lib/python2.7/dist-packages/pyroute2/netlink/nlsocket.py", line 648, in get
raise msg['header']['error']
pyroute2.netlink.exceptions.NetlinkError: (34, 'Numerical result out of range')
Am I missing something when moving the VLAN sub-interface into the new netns that is different from the VLAN interface?
I tried with 0x8100 and 0x88a8 as the VLAN protocol and double checked the creation of the sub-interface from issue #361
The text was updated successfully, but these errors were encountered:
Hey,
You're seeing this error because the interface's name is too long; it's 16 characters but the maximum allowed by the kernel is 15.
I tried your code and with a shorter interface name, it seems to work.
I am trying to create a VLAN sub-interface with an associated macvlan passthru interface to move into a new netns using pyroute2. I am able to successfully create both the vlan and sub-interface, but I am only able to move the VLAN interface into the new netns. Here is example code:
The results of the script are:
Am I missing something when moving the VLAN sub-interface into the new netns that is different from the VLAN interface?
I tried with 0x8100 and 0x88a8 as the VLAN protocol and double checked the creation of the sub-interface from issue #361
The text was updated successfully, but these errors were encountered: