Multiple IPStack Related changes (and other bugfixes)
[tpg/acess2.git] / Usermode / Applications / ifconfig_src / main.c
index 3f7cfc4..b80f6fa 100644 (file)
@@ -134,6 +134,11 @@ void DumpInterface(const char *Name)
        
        type = ioctl(fd, 4, NULL);
        
+       // Ignore -1 values
+       if( type == -1 ) {
+               return ;
+       }
+       
        printf("%s:\t", Name);
        {
                 int    call_num = ioctl(fd, 3, "get_device");
@@ -213,7 +218,7 @@ void AddRoute(const char *Interface, void *Dest, int MaskBits, void *NextHop)
        
        // Create route
        fd = open(IPSTACK_ROOT"/routes", 0);
-       num = ioctl(fd, ioctl(fd, 3, "add_route"), Interface);
+       num = ioctl(fd, ioctl(fd, 3, "add_route"), (char*)Interface);
        close(fd);
        
        // Open route

UCC git Repository :: git.ucc.asn.au