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: NoneSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

Add a New Comment (Rich MarkupRich 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:

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>
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?

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

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

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    No Changes Have Been Made to This Item

    Back to the top


    Powered by Savane 3.1-cleanup