@@ -31,9 +31,11 @@ void unik::Client::register_instance(net::Inet4& inet, const net::UDP::port_t po
3131
3232 INFO (" Unik client" , " Initializing Unik registration service" );
3333 INFO (" Unik client" ," Listening for UDP hearbeat on %s:%i" , inet.ip_addr ().str ().c_str (), port);
34+ INFO (" Unik client" ," IP is attached to interface %s " , inet.link_addr ().str ().c_str ());
3435
3536 // Set up an UDP port for receiving UniK heartbeat
3637 auto & sock = inet.udp ().bind (port);
38+ CHECK (net::Inet4::stack<0 >().udp ().is_bound (port), " Unik UDP port is bound as expected" );
3739 sock.on_read ([&sock, &inet] (auto addr, auto port, const char * data, size_t len) {
3840
3941 static bool registered_with_unik = false ;
@@ -56,7 +58,7 @@ void unik::Client::register_instance(net::Inet4& inet, const net::UDP::port_t po
5658 std::string prefix = strdata.substr (0 ,dotloc);
5759 std::string ip_str = strdata.substr (dotloc + 1 );
5860
59- INFO (" Unik client" ," Prefix: %s , IP: %s \n " , prefix.c_str (), ip_str.c_str ());
61+ INFO (" Unik client" ," Prefix: %s , IP: '%s' \n " , prefix.c_str (), ip_str.c_str ());
6062
6163 net::IP4::addr ip{ip_str};
6264 net::tcp::Socket unik_instance_listener { ip , 3000 };
@@ -104,7 +106,7 @@ void unik::Client::register_instance(net::Inet4& inet, const net::UDP::port_t po
104106
105107void unik::Client::register_instance_dhcp () {
106108 // Bring up a network device using DHCP
107- static auto & inet = net::Inet4::stack<0 >();
109+ static auto && inet = net::Inet4::stack<0 >();
108110
109111 net::Inet4::ifconfig<0 >(10.0 , [](bool timeout) {
110112 if (timeout) {
0 commit comments