diff options
author | 2022-06-23 11:06:11 -0400 | |
---|---|---|
committer | 2022-06-23 11:06:11 -0400 | |
commit | b8176458e082353e7e145e6b08f7600e8f7d0596 (patch) | |
tree | 576d711b049695a4c12799ad4621e01286462c50 /src/fnettrace | |
parent | Transmission fixes: drop private-lib (#5213) (diff) | |
download | firejail-b8176458e082353e7e145e6b08f7600e8f7d0596.tar.gz firejail-b8176458e082353e7e145e6b08f7600e8f7d0596.tar.zst firejail-b8176458e082353e7e145e6b08f7600e8f7d0596.zip |
nettrace dixes
Diffstat (limited to 'src/fnettrace')
-rw-r--r-- | src/fnettrace/main.c | 40 |
1 files changed, 37 insertions, 3 deletions
diff --git a/src/fnettrace/main.c b/src/fnettrace/main.c index 634d408a3..f5e9bea65 100644 --- a/src/fnettrace/main.c +++ b/src/fnettrace/main.c | |||
@@ -222,8 +222,27 @@ static unsigned adjust_bandwidth(unsigned bw) { | |||
222 | } | 222 | } |
223 | 223 | ||
224 | static inline const char *common_port(uint16_t port) { | 224 | static inline const char *common_port(uint16_t port) { |
225 | if (port > 123) | 225 | if (port > 194) { |
226 | if (port >= 6660 && port <= 6669) | ||
227 | return "(IRC)"; | ||
228 | else if (port == 6679) | ||
229 | return "(IRC)"; | ||
230 | else if (port == 6771) | ||
231 | return "(BitTorrent)"; | ||
232 | else if (port >= 6881 && port <= 6999) | ||
233 | return "(BitTorrent)"; | ||
234 | else if (port == 9001) | ||
235 | return "(Tor)"; | ||
236 | else if (port == 9030) | ||
237 | return "(Tor)"; | ||
238 | else if (port == 9050) | ||
239 | return "(Tor)"; | ||
240 | else if (port == 9051) | ||
241 | return "(Tor)"; | ||
242 | else if (port == 9150) | ||
243 | return "(Tor)"; | ||
226 | return NULL; | 244 | return NULL; |
245 | } | ||
227 | 246 | ||
228 | if (port == 20 || port == 21) | 247 | if (port == 20 || port == 21) |
229 | return "(FTP)"; | 248 | return "(FTP)"; |
@@ -245,8 +264,16 @@ static inline const char *common_port(uint16_t port) { | |||
245 | return "(POP2)"; | 264 | return "(POP2)"; |
246 | else if (port == 110) | 265 | else if (port == 110) |
247 | return "(POP3)"; | 266 | return "(POP3)"; |
267 | else if (port == 113) | ||
268 | return "(IRC)"; | ||
248 | else if (port == 123) | 269 | else if (port == 123) |
249 | return "(NTP)"; | 270 | return "(NTP)"; |
271 | else if (port == 161) | ||
272 | return "(SNMP)"; | ||
273 | else if (port == 162) | ||
274 | return "(SNMP)"; | ||
275 | else if (port == 194) | ||
276 | return "(IRC)"; | ||
250 | 277 | ||
251 | return NULL; | 278 | return NULL; |
252 | } | 279 | } |
@@ -321,12 +348,19 @@ static void hnode_print(unsigned bw) { | |||
321 | protocol = "(TLS)"; | 348 | protocol = "(TLS)"; |
322 | else if (ptr->port_src == 53) | 349 | else if (ptr->port_src == 53) |
323 | protocol = "(DNS)"; | 350 | protocol = "(DNS)"; |
324 | else if (ptr->port_src == 853) | 351 | else if (ptr->port_src == 853) { |
325 | protocol = "(DoT)"; | 352 | if (ptr->protocol == 0x06) |
353 | protocol = "(DoT)"; | ||
354 | else if (ptr->protocol == 0x11) | ||
355 | protocol = "(DoQ)"; | ||
356 | else | ||
357 | protocol = NULL; | ||
358 | } | ||
326 | else if ((protocol = common_port(ptr->port_src)) != NULL) | 359 | else if ((protocol = common_port(ptr->port_src)) != NULL) |
327 | ; | 360 | ; |
328 | else if (ptr->protocol == 0x11) | 361 | else if (ptr->protocol == 0x11) |
329 | protocol = "(UDP)"; | 362 | protocol = "(UDP)"; |
363 | |||
330 | if (protocol == NULL) | 364 | if (protocol == NULL) |
331 | protocol = ""; | 365 | protocol = ""; |
332 | 366 | ||