Returning pointers to stack allocated variables has undefined behavior

The 'mac_addr_to_cstr' function causes mac addresses to zero out due to compiler optimization since pointers to stack allocated memory is not valid outside the scope of the function.

Testing is limited to running trema due to issues with compiling the unit tests.