X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;ds=sidebyside;f=Usermode%2FApplications%2Fip_src%2Froutes.c;h=a5f682ce2669bb1a06c4558e01f1de3d8538ca80;hb=3bcb134d0523071a59375fdda3ab3e9ef8076dfb;hp=ba568135a0cc898b7270166fc21e1eb97d621681;hpb=52fad670ab81459de0ff1bd0fa99a3396a6999e3;p=tpg%2Facess2.git diff --git a/Usermode/Applications/ip_src/routes.c b/Usermode/Applications/ip_src/routes.c index ba568135..a5f682ce 100644 --- a/Usermode/Applications/ip_src/routes.c +++ b/Usermode/Applications/ip_src/routes.c @@ -50,15 +50,15 @@ int Routes_main(int argc, char *argv[]) } // Destination IP - addrType = ParseIPAddress(argv[3], dest, &subnetBits); + addrType = ParseIPAddress(argv[2], dest, &subnetBits); if( subnetBits == -1 ) { subnetBits = Net_GetAddressSize(addrType)*8; } // Interface Name / Next Hop - if( (nextHopType = ParseIPAddress(argv[4], nextHop, &nextHopBits)) == 0 ) + if( (nextHopType = ParseIPAddress(argv[3], nextHop, &nextHopBits)) == 0 ) { // Interface name - ifaceName = argv[4]; + ifaceName = argv[3]; } else { @@ -78,8 +78,8 @@ int Routes_main(int argc, char *argv[]) // Metric if( argc - 3 >= 3 ) { - metric = atoi(argv[5]); - if( metric == 0 && argv[5][0] != '0' ) { + metric = atoi(argv[4]); + if( metric == 0 && argv[4][0] != '0' ) { fprintf(stderr, "ERROR: Metric should be a number\n"); return -1; }