Hi, I my setup, I use a fwd rule to forward all udp traffic to my local proxy:
ipfw add 10 fwd localhost,7000 udp from any to any recv em1 The proxy needs to know the original destination address of forwarded datagrams, but there seems to be no way to obtain that address. Using recvmsg with IP_RECVDSTADDR does not help because it returns next-hop address instead of original destination. This is because udp_input() overwrites packet's destination with next-hop address before doing ip_savecontrol. It seems easy to change udp_input to pass the original dest. address to ip_savecontrol. Another soultion would be to implement IP_RECVDSTSOCKADDR option, which records the original destination address:port as a 'struct sockaddr_in[6]' in packet's control data. Comments/suggestions are welcome. -- Best regards. Hooman Fazaeli _______________________________________________ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"