]> git.ipfire.org Git - people/jschlag/ipfire-2.x.git/commitdiff
setup: Copy the description of a mac without "" add_network_zone_functions
authorJonatan Schlag <jonatan.schlag@ipfire.org>
Sun, 22 Sep 2024 15:18:18 +0000 (17:18 +0200)
committerJonatan Schlag <jonatan.schlag@ipfire.org>
Sun, 22 Sep 2024 16:21:31 +0000 (18:21 +0200)
This creates problems as the "" are invalid characters which our
new bash readhash refuses to accepts.

Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
src/setup/netstuff.c

index ec4c31513994d936ec49ba9cd059dfab3659465c..5967a7882f5f992901573ee9949ec3edde3669e4 100644 (file)
@@ -606,7 +606,7 @@ int scan_network_cards(void)
                                sprintf(nics[count].driver, "%s", temp_line+strlen(_driver));
                        }
                        if ( strncmp(temp_line, _desc, strlen(_desc)) ==  0 ) {
-                               sprintf(nics[count].description, "%s", temp_line+strlen(_desc));
+                               snprintf(nics[count].description, strlen(temp_line) - strlen(_desc) - 1,"%s", temp_line+strlen(_desc)+1 );
                        }
                        if ( strncmp(temp_line, _network_hwaddr, strlen(_network_hwaddr)) ==  0 ) {
                                sprintf(nics[count].macaddr,     "%s", temp_line+strlen(_network_hwaddr));