Commit 0fbafe44 authored by Phil Blundell's avatar Phil Blundell

Make --tcp and similar options behave sensibly.

parent 4eec9b72
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* NET-3 Networking Distribution for the LINUX operating * NET-3 Networking Distribution for the LINUX operating
* system. * system.
* *
* Version: $Id: netstat.c,v 1.11 1998/11/18 13:46:16 philip Exp $ * Version: $Id: netstat.c,v 1.12 1998/11/29 13:29:11 philip Exp $
* *
* Authors: Fred Baumgarten, <dc6iq@insu1.etec.uni-karlsruhe.de> * Authors: Fred Baumgarten, <dc6iq@insu1.etec.uni-karlsruhe.de>
* Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org> * Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
...@@ -1281,9 +1281,12 @@ int main ...@@ -1281,9 +1281,12 @@ int main
if (flag_int + flag_rou + flag_nlp + flag_mas > 1) if (flag_int + flag_rou + flag_nlp + flag_mas > 1)
usage(); usage();
if (flag_inet || flag_inet6) if ((flag_inet || flag_inet6) && !(flag_tcp || flag_udp || flag_raw))
flag_tcp = flag_udp = flag_raw = 1; flag_tcp = flag_udp = flag_raw = 1;
if ((flag_tcp || flag_udp || flag_raw) && !(flag_inet || flag_inet6))
flag_inet = flag_inet6 = 1;
flag_arg = flag_tcp + flag_udp + flag_raw + flag_unx + flag_ipx flag_arg = flag_tcp + flag_udp + flag_raw + flag_unx + flag_ipx
+ flag_ax25 + flag_netrom; + flag_ax25 + flag_netrom;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment