diff --git a/misc/ss.c b/misc/ss.c index 870cad185341..4de77e92c319 100644 --- a/misc/ss.c +++ b/misc/ss.c @@ -1554,6 +1554,8 @@ out: static char *proto_name(int protocol) { switch (protocol) { + case IPPROTO_RAW: + return "raw"; case IPPROTO_UDP: return "udp"; case IPPROTO_TCP: @@ -2398,7 +2400,7 @@ static int dgram_show_line(char *line, const struct filter *f, int family) if (n < 9) opt[0] = 0; - inet_stats_print(&s, IPPROTO_UDP); + inet_stats_print(&s, dg_proto == UDP_PROTO ? IPPROTO_UDP : IPPROTO_RAW); if (show_details && opt[0]) printf(" opt:\"%s\"", opt);