Datagram socket and security manager
I have subclassed the security manager to implement my own network security rules.
However when the receive(datagramPacket) method is called by the my datagram socket, the host parameter passed to the checkAccept(host, port) method does not belong to the sender of the packet(to be received).
How then can malicious addresses be blocked by the security manager, as suggested by the comments in the source code of DatagramSocket.
Any help is greatly appreciated. Thank you in advance.
[508 byte] By [
jinfunna] at [2007-11-26 16:38:58]

# 1
> However when the receive(datagramPacket) method is
> called by the my datagram socket, the host parameter
> passed to the checkAccept(host, port) method does
> not belong to the sender of the packet(to be
> received).
It should. What are you getting instead?
ejpa at 2007-7-8 23:05:49 >

# 3
It's a bug in DatagramSocket. Report it. It creates a new DatagramPacket and then gets the IP address from that, without peeking at the actual incoming packet, unless you are in <= JDK 1.3. So you get your own IP address.Bizarre.
ejpa at 2007-7-8 23:05:49 >
