I have a simple Python script that uses the socket module to send a UDP packet. The script works fine on my Windows box, but on my Ubuntu Linux PC the packet it sends is slightly different. On Windows the flags field in the IP header is zero, but using the same code on Linux created a packet with the flags field set to 4. I'd like to modify my script so it has consistent behavior on Windows and Linux.
Is there a method for controlling the flags field in the socket module? Or, is this a setting I have to change in Linux?