Ticket #44 (new defect)

Opened 1 year ago

Last modified 6 months ago

Select() calls do not handle EINTR

Reported by: t3rmin4t0r Assigned to: pbi
Priority: minor Milestone:
Component: Scapy Version:
Keywords: Cc: gopalv82@yahoo.com

Description

None of the select() calls in scapy.py handles syscall interruptions.

The attached patch is workaround which lets me use scapy in my tools.

Attachments

scapy.patch (0.6 kB) - added by t3rmin4t0r on 05/21/07 16:53:39.
replace select() with a custom loop with EINTR handling

Change History

05/21/07 16:53:39 changed by t3rmin4t0r

  • attachment scapy.patch added.

replace select() with a custom loop with EINTR handling

05/21/07 18:07:38 changed by pbi

  • priority changed from major to minor.

Which use case need this ? How did you get an EINTR error ? What operating system ? Usually, except when playing with sigaction(), the kernel restart interrupted system calls by itself.

05/21/07 19:54:43 changed by t3rmin4t0r

I'm using scapy in a hacked up python-twisted DNS server on linux-x86-smp (ubuntu edgy).

What it was supposed to do was to convert DNS requests into RARPs on LAN - but most OSes don't respond to RARP - but an ARP ping scan can do nearly the same.

I'll put up the entire code tomorrow (<100 lines).

05/23/07 17:35:36 changed by t3rmin4t0r

I've put up the code at

http://t3.dotgnu.info/code/dnsmac.tar.gz

to use, edit the dnsconfig.py to add a host/mac mapping and set iface to eth0/eth1. And run

dig @127.0.0.2 <host>

Sometimes it locks up, sometimes it just throws an EINTR. With the patch, it works.


Add/Change #44 (Select() calls do not handle EINTR)




Change Properties
Action