UDP/ICMP/RAW send, sendto, sendmsg return EINVAL "Invalid argument" error

Solution Verified - Updated -

Issue

  • A sample python tool is written to send out multicast packets @ 10 packets per second for 2000 different multicast addresses, i.e. total 20k packets per seconds. However, we find that if second instance of the tool is run to send out even at 1 packets per second for 2000 different multicast addresses, both instances may hit the Invalid Argument error when sending out the packets.
# python sendm.py 10 0.0.1 > /dev/null
Traceback (most recent call last):
  File "sendm.py", line 61, in <module>
    byteS = sock.sendto(.......)
socket.error: [Errno 22] Invalid argument
  • Or for Openstack from a router namespace in an instance on that router:
64 bytes from 10.0.0.1: icmp_seq=150 ttl=64 time=0.054 ms
64 bytes from 10.0.0.1: icmp_seq=151 ttl=64 time=0.066 ms
64 bytes from 10.0.0.1: icmp_seq=152 ttl=64 time=0.051 ms
ping: sendmsg: Invalid argument
ping: sendmsg: Invalid argument
ping: sendmsg: Invalid argument
  • sendto(2) returns unexpected EINVAL

Environment

  • Red Hat Enterprise Linux 7
  • Any connectionless protocol that uses the sockets API:
    • UDP (including multicast)
    • ICMP
    • RAW

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content