Skip to content

Commit cdbb9bd

Browse files
authored
fixed get_ext_iface
match default gateway instead of destination
1 parent c905489 commit cdbb9bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/util.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ get_ext_iface(void)
254254
}
255255
while (!feof(input)) {
256256
/* XXX scanf(3) is unsafe, risks overrun */
257-
if ((fscanf(input, "%15s %*s %15s %*s %*s %*s %*s %*s %*s %*s %*s\n", device, gw) == 2)
257+
if ((fscanf(input, "%15s %15s %*s %*s %*s %*s %*s %*s %*s %*s %*s\n", device, gw) == 2)
258258
&& strcmp(gw, "00000000") == 0) {
259259
free(gw);
260260
debug(LOG_INFO, "get_ext_iface(): Detected %s as the default interface after trying %d", device, i);

0 commit comments

Comments
 (0)