s4:lib:socket: skip extra data in interpret_interface()
[sfrench/samba-autobuild/.git] / source4 / lib / socket / interface.c
index 504a7277e32206b700453cf32ee39b7defc4340d..9b0d00e01b75a7ec8780e55cb6d12fae472fd4f3 100644 (file)
@@ -178,6 +178,15 @@ static void interpret_interface(TALLOC_CTX *mem_ctx,
                return;
        }
 
+       p = strchr_m(token, ';');
+       if (p != NULL) {
+               /*
+                * skip smbd-specific extra data:
+                * link speed, capabilities, and interface index
+                */
+               *p = 0;
+       }
+
        /* maybe it is a DNS name */
        p = strchr_m(token,'/');
        if (p == NULL) {