fix-maxmtu-command-line-20081018

LICENSE MIT

fix the variable used for maxmtu command line processing
This commit is contained in:
Jeffrey Altman 2008-10-18 16:08:50 +00:00
parent f5455f7498
commit 1bdea5e470
2 changed files with 4 additions and 4 deletions

View File

@ -825,12 +825,12 @@ main(int argc, char **argv, char **envp)
else if (strcmp(argv[code], "-allow-dotted-principals") == 0) {
rxkadDisableDotCheck = 1;
}
else if (!strcmp(argv[i], "-rxmaxmtu")) {
if ((i + 1) >= argc) {
else if (!strcmp(argv[code], "-rxmaxmtu")) {
if ((code + 1) >= argc) {
fprintf(stderr, "missing argument for -rxmaxmtu\n");
exit(1);
}
rxMaxMTU = atoi(argv[++i]);
rxMaxMTU = atoi(argv[++code]);
if ((rxMaxMTU < RX_MIN_PACKET_SIZE) ||
(rxMaxMTU > RX_MAX_PACKET_DATA_SIZE)) {
printf("rxMaxMTU %d invalid; must be between %d-%d\n",

View File

@ -198,7 +198,7 @@ main(argc, argv)
fprintf(stderr, "missing argument for -rxmaxmtu\n");
return -1;
}
rxMaxMTU = atoi(argv[++i]);
rxMaxMTU = atoi(argv[++index]);
if ((rxMaxMTU < RX_MIN_PACKET_SIZE) ||
(rxMaxMTU > RX_MAX_PACKET_DATA_SIZE)) {
printf("rxMaxMTU %d invalid; must be between %d-%d\n",