* [PATCH 1/2] [IPROUTE2] Add missing LIBUTIL for dependencies.
@ 2007-09-11 20:02 John Heffner
2007-09-11 20:02 ` [PATCH 2/2] [IPROUTE2] ss: parse bare integers are port numbers rather than IP addresses John Heffner
0 siblings, 1 reply; 2+ messages in thread
From: John Heffner @ 2007-09-11 20:02 UTC (permalink / raw)
To: shemminger; +Cc: netdev, John Heffner
Signed-off-by: John Heffner <jheffner@psc.edu>
---
Makefile | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/Makefile b/Makefile
index af0d5e4..7e4605c 100644
--- a/Makefile
+++ b/Makefile
@@ -29,7 +29,8 @@ LDLIBS += -L../lib -lnetlink -lutil
SUBDIRS=lib ip tc misc netem genl
-LIBNETLINK=../lib/libnetlink.a ../lib/libutil.a
+LIBUTIL=../lib/libutil.a
+LIBNETLINK=../lib/libnetlink.a $(LIBUTIL)
all: Config
@set -e; \
--
1.5.3.rc4.29.g74276-dirty
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 2/2] [IPROUTE2] ss: parse bare integers are port numbers rather than IP addresses
2007-09-11 20:02 [PATCH 1/2] [IPROUTE2] Add missing LIBUTIL for dependencies John Heffner
@ 2007-09-11 20:02 ` John Heffner
0 siblings, 0 replies; 2+ messages in thread
From: John Heffner @ 2007-09-11 20:02 UTC (permalink / raw)
To: shemminger; +Cc: netdev, John Heffner
Signed-off-by: John Heffner <jheffner@psc.edu>
---
misc/ss.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/misc/ss.c b/misc/ss.c
index 5d14f13..d617f6d 100644
--- a/misc/ss.c
+++ b/misc/ss.c
@@ -953,6 +953,10 @@ void *parse_hostcond(char *addr)
memset(&a, 0, sizeof(a));
a.port = -1;
+ /* Special case: integer by itself is considered a port number */
+ if (!get_integer(&a.port, addr, 0))
+ goto out;
+
if (fam == AF_UNIX || strncmp(addr, "unix:", 5) == 0) {
char *p;
a.addr.family = AF_UNIX;
--
1.5.3.rc4.29.g74276-dirty
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-09-11 20:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-11 20:02 [PATCH 1/2] [IPROUTE2] Add missing LIBUTIL for dependencies John Heffner
2007-09-11 20:02 ` [PATCH 2/2] [IPROUTE2] ss: parse bare integers are port numbers rather than IP addresses John Heffner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).