]> git.proxmox.com Git - mirror_iproute2.git/blobdiff - lib/inet_proto.c
ip: add a new parameter -Numeric
[mirror_iproute2.git] / lib / inet_proto.c
index bdfd52fdafe5a828f9543b8cdfcbf17cc170c329..41e2e8b88d82b05a752e8b259b951371c0b85033 100644 (file)
@@ -13,7 +13,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
-#include <syslog.h>
 #include <fcntl.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
@@ -33,7 +32,7 @@ const char *inet_proto_n2a(int proto, char *buf, int len)
                return ncache;
 
        pe = getprotobynumber(proto);
-       if (pe) {
+       if (pe && !numeric) {
                if (icache != -1)
                        free(ncache);
                icache = proto;