Ticket #146 (assigned enhancement)

Opened 3 months ago

Last modified 3 weeks ago

outs.sendto buffer problem on slow ppp link

Reported by: Grzegorz Szczytowski Assigned to: anonymous (accepted)
Priority: minor Milestone: mainstream
Component: Scapy Version: 2.0.0.x
Keywords: out.sendto buffer ppp Cc:

Description

out.sendto function on slow ppp link cause error: (105, 'No buffer space available')

Welcome to Scapy (2.0.0.10 beta)
>>>conf.route
/usr/lib/python2.5/site-packages/scapy/utils.py:273: 
DeprecationWarning: struct integer overflow masking is deprecated
return inet_ntoa(struct.pack("!I", x))
Network         Netmask         Gateway         Iface           Output IP
127.0.0.0       255.0.0.0       0.0.0.0         lo              127.0.0.1      
10.6.6.6        255.255.255.255 0.0.0.0         ppp0            10.11.222.86   
0.0.0.0         0.0.0.0         0.0.0.0         ppp0            10.11.222.86   

>>>p=IP(dst='1.1.1.1')/TCP(flags='S',dport=(1,1024))
>>>p
<IP  frag=0 proto=tcp dst=1.1.1.1 |<TCP  dport=(1, 1024) flags=S |>>
send(p,iface='ppp0')
.................................... (most recent call last):
  File "<console>", line 1, in <module>
  File "/usr/lib/python2.5/site-packages/scapy/sendrecv.py", line 235, in send
    __gen_send(conf.L3socket(*args, **kargs), x, inter=inter, 
  loop=loop, count=count,verbose=verbose)
  File "/usr/lib/python2.5/site-packages/scapy/sendrecv.py", line 218,
  in __gen_send s.send(p)
  File "/usr/lib/python2.5/site-packages/scapy/arch/linux.py", line 381, in send
    self.outs.sendto(sx, sdto)
error: (105, 'No buffer space available')

Workaround solution from Philippe Biondi

Use the 'inter' parameter to give a time interval between 2 packets.

Comment from Grzegorz Szczytowski

For UMTS HSDPA links inter=.00001 has been selected epirically

send(p,iface='ppp0',inter=.00001)

Attachments

Change History

12/19/08 16:35:34 changed by pbi

  • type changed from defect to enhancement.

12/19/08 16:35:59 changed by pbi

  • owner changed from pbi to anonymous.
  • status changed from new to assigned.

Add/Change #146 (outs.sendto buffer problem on slow ppp link)




Change Properties
Action