Fixed a possible crashing bug when used in the wrong way.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19067 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2006-10-14 19:54:28 +00:00
parent 08d85bd298
commit ed013acf90
1 changed files with 6 additions and 0 deletions

View File

@ -446,6 +446,12 @@ main(int argc, char** argv)
add_route(socket, interface, route);
break;
case RTM_DELETE:
if (interface == NULL) {
fprintf(stderr, "%s: You need to specify an interface when removing a route.\n",
kProgramName);
usage(1);
}
delete_route(socket, interface, route);
break;