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

 
 

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

Submitter:  None
Submitted:  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
* Mandatory Fields

Add a New Comment Rich Markup
   

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:

http://lwn.net/Articles/443051/

Anonymous
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>
Group administrator
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?

Anonymous

 

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

Attach Files:
   
   
Comment:
   

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)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code