bugGNU Networking Utilities - Bugs: bug #37252, Use IPPROTO_ICMP socket type...


bug #37252: Use IPPROTO_ICMP socket type instead of raw sockets, if available

Submitted by:  None
Submitted on:  Sun 02 Sep 2012 01:46:19 AM UTC  
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Tue 04 Sep 2012 04:20:42 AM UTC, comment #2: 

It does, but like this:

 proto = getprotobyname ("icmp");
  if (!proto)
      fprintf (stderr, "ping: unknown protocol icmp.\n");
      return NULL;

  fd = socket (AF_INET, SOCK_RAW, proto->p_proto);

What the goal would be is to have it look like this:

fd = socket (AF_INET, SOCK_DGRAM, proto->p_proto)

Also, some of the values currently handled by ping will need to be passed as socket options.

Btw, reference is here:


Mon 03 Sep 2012 08:21:29 AM UTC, comment #1: 

Doesn't recent inetutils use IPPROTO_ICMP?  I see some uses of IPPROTO_ICMP in there.

Generally I would +1 anything that leads to removing setuid bits.

Simon Josefsson <jas>
Project Member
Sun 02 Sep 2012 01:46:19 AM UTC, original submission:  

This socket type has been available since last year. While not enabled by default, it would be excellent to integrate this into inetutils if it is available.

Long term, would it make sense to move to this so as to avoid setuid on a basic utility?



(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by jas (Posted a comment)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    No changes have been made to this item

    Back to the top

    Powered by Savane 3.5