s4:lib:socket: skip extra data in interpret_interface()
authorMichael Adam <obnox@samba.org>
Mon, 25 Jan 2016 15:22:57 +0000 (16:22 +0100)
committerMichael Adam <obnox@samba.org>
Tue, 26 Jan 2016 06:33:16 +0000 (07:33 +0100)
This is currently smbd-specific.
No need to duplicate the extended parsing
while these functions have not been merged yet.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
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) {