Skip to content

Commit ea04ac8

Browse files
committed
return if_index in json
1 parent 9f3959b commit ea04ac8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

http/link_fcgi.c

+6
Original file line numberDiff line numberDiff line change
@@ -900,6 +900,12 @@ json_if_data(int req_num)
900900
printf(",");
901901
printf("\"i\":%d", i);
902902

903+
int if_index = if_nametoindex(s);
904+
if (if_index > 0) {
905+
printf(",");
906+
printf("\"index\":%d", if_index);
907+
}
908+
903909
printf(",");
904910
printf("\"IFF\":");
905911
printf("{");

0 commit comments

Comments
 (0)