Scout Module API

Restrictions on Sent Packets

Restrictions on Sent Packets

Packets sent on a safe raw socket will be rejected if any of the following is true:

If IP_HDRINCL was set on the socket:

  • The source IP address of the packet is a non-local address. (If the source address is left blank, then the kernel will fill it in.)

  • The protocol in the IP header is not the protocol specified when the socket was created

If the safe raw socket is a TCP/UDP socket:

  • The source port in the TCP/UDP header is not the same local port to which the socket was bound

If the safe raw socket is an ICMP socket:

  • The socket was created with a protocol of IPPROTO_ICMP_TCP or IPPROTO_ICMP_UDP

  • The identifier in the ICMP header is not the same one to which the socket was bound