luci-lib-ip: add MAC address calculation support