Summary: | [udp] ip_id not protected ... | ||
---|---|---|---|
Product: | Base System | Reporter: | Ernest Hua <ehua> |
Component: | kern | Assignee: | freebsd-bugs (Nobody) <bugs> |
Status: | Closed Overcome By Events | ||
Severity: | Affects Only Me | CC: | thj |
Priority: | Normal | ||
Version: | 7.0-RELEASE | ||
Hardware: | Any | ||
OS: | Any |
Description
Ernest Hua
2009-04-14 22:10:02 UTC
Responsible Changed From-To: freebsd-bugs->freebsd-net Over to maintainer(s). For bugs matching the following criteria: Status: In Progress Changed: (is less than) 2014-06-01 Reset to default assignee and clear in-progress tags. Mail being skipped Hi, I wrote a python test case that I think should exercise this. I didn't manage to hit this case, if you can reproduce this on a modern FreeBSD please reopen the bug. If you can add an exact reproduction case that would be very helpful. server: #!/usr/bin/env python3 import socket import sys UDP_IP = "0.0.0.0" UDP_PORT = 5005 sock = socket.socket(socket.AF_INET, # Internet socket.SOCK_DGRAM) # UDP sock.bind((UDP_IP, UDP_PORT)) peers = {} while True: data, addr = sock.recvfrom(2500) #sys.stdout.write(".") #sys.stdout.flush() if addr in peers: if data != peers[addr]: print("mismatch in recv'd data") print("peer {} \n data: \t{} recvd: {}\t".format(addr, peers[addr], data)) exit() else: peers[addr] = data client: #!/usr/bin/env python3 import socket from multiprocessing import Process def sendthread(ip, port, message): sock = socket.socket(socket.AF_INET, # Internet socket.SOCK_DGRAM) # UDP while True: try: sock.sendto(message, (ip, port)) except OSError as e: if e.errno == 55: pass if __name__ == '__main__': ip = "137.50.17.240" port = 5005 one = Process(target=sendthread, args=(ip, port, bytes("A" * 2000, encoding='ascii'))) two = Process(target=sendthread, args=(ip, port, bytes("B" * 2000, encoding='ascii'))) one.start() two.start() one.join() two.join() |