mildsunrise / node_netlink

⚒ Use Netlink from Node.js
MIT License
22 stars 2 forks source link

getLinks fails #16

Closed travisghansen closed 2 years ago

travisghansen commented 2 years ago
Error: Not null terminated
    at Object.getString (/home/thansen/Projects/github/travisghansen/metallb-node-route-agent/node_modules/netlink/dist/structs.js:312:15)
    at Object.54 (/home/thansen/Projects/github/travisghansen/metallb-node-route-agent/node_modules/netlink/dist/rt/ifla.js:245:52)
mildsunrise commented 2 years ago

the wonders of netlink and poor documentation! it seems strings don't necessarily have to be nul terminated, let me check how libnl handles this...

mildsunrise commented 2 years ago

ah no, strings are alright, it's just that the enum wasn't parsed correctly and some attribute IDs were shifted by one

travisghansen commented 2 years ago

I've wiped out the module and reinstalled but seem to still be getting this error..I'm not sure exactly where I can look to be sure I've got the updated code however.

mildsunrise commented 2 years ago

you need to rerun the code generation with npm run codegen, sorry. I do it before every release, but didn't do it yet since I want to look at #14 first (which is probably a similar issue to this one)

travisghansen commented 2 years ago

Ok I’ll try that out..