Not setting IPv4 broadcast address results in "netlink receive: numerical result out of range"
Closed this issue · 2 comments
What I do
Take https://github.com/jsimonetti/rtnetlink/blob/master/example_address_add_test.go and remove the broadcast IPv4 address from Attributes to get an address without broadcast enabled (which is a perfectly valid configuration for e.g. point-to-point links).
What I expect
IPv4 address assigned to the interface without a broadcast address associated as it is possible to do using e.g. ip addr add whatever/32 dev ifacename
What I get
Error is returned by Address.New: netlink receive: numerical result out of range
Looking at nlmon dump, library seems to generate an empty broadcast address attribute whereas it should not include it altogether (by comparing the library dump with ip addr ...
dump)
Hi foxcpp,
I think this has a very easy fix. Let me see what I can come up with.
Please check the latest version. This should fix your problem.