Skip to content

Commit

Permalink
Set sensible default for port
Browse files Browse the repository at this point in the history
Commit 915444b introduced a regression
whereby an entry in nbdtab with no port specification was read as
wanting port "0" rather than the default "10809".
  • Loading branch information
waveform80 authored and yoe committed Apr 3, 2024
1 parent f8d7d3d commit 256f95a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions nbd-client.c
Original file line number Diff line number Diff line change
Expand Up @@ -754,6 +754,7 @@ bool get_from_config(char* cfgname, char** name_ptr, char** dev_ptr, char** host
cur_client = calloc(sizeof(CLIENT), 1);
cur_client->bs = 512;
cur_client->nconn = 1;
cur_client->port = NBD_DEFAULT_PORT;
yyin = fopen(SYSCONFDIR "/nbdtab", "r");
yyout = fopen("/dev/null", "w");

Expand Down

0 comments on commit 256f95a

Please sign in to comment.