Digital Malayali :ve: · @digitalmalayali
19 followers · 217 posts · Server techhub.social
Thomas Liske · @liske
36 followers · 396 posts · Server ibh.social

While implementing the netns handling in ifstate I got aware that pyroute2 did not have a netlink RTM_NEWNSID request implementation.

I got github.com/svinota/pyroute2/pu merged into pyroute2 to add RTM_NEWNSID support.

Later I have noticed that my implementation does not work within netns (pyroute2 related, some details in issue github.com/svinota/pyroute2/is ).

After this tangled journey ifstate netns dev branch now has its first netns superpowers 😎

#ifstate #linux #linuxnetworking #netlink #pyroute2

Last updated 1 year ago

Thomas Liske · @liske
5 followers · 15 posts · Server ibh.social

The correct (unexpected?) answer is: 0

When adding another ipv4 address of an already assigned prefix it becomes a secondary address. Removing the primary ipv4 address of a prefix removes all secondary addresses of the prefix.

A more complex examples is found in the attached screenshot.

For ipv6 there is no secondary ip address concept. The bit in the datagrams for secondary addresses in ipv4 is used for temporary addresses in ipv6 netlink datagrams.

#netlink #linux #linuxnetworking

Last updated 1 year ago