WWII ASW IFF question

I’ve got to wondering about WWII ASW IFF.

My impression is that if you were piloting your PB4Y-2 around somewhere in the Pacific in 1944 and one of your eagle-eyed gunners spotted a periscope wake, you’d swoop in and dump whatever ASW ordnance was on hand.

So, how did you know that wasn’t some good guys?

Holy acronyms, Batman!

My impression, from reading quite a few books on submarine warfare in the Pacific, both fiction and well-regarded non-fiction, is that for much of the war the U.S. subs would seek to attack Japanese merchant shipping near to the home islands of Japan and out of range of allied ASW aircraft. When submarines were transiting between their patrol areas and the submarine bases (Pearl Harbor, Midway, Australia, etc.), the subs would stick to previously defined transit corridors. Aircraft finding submarines out of the transit corridors would be free to attack.

I seem to recall reading about this once - but I can’t find the source right now. From memory there were free-fire zones, areas where Allied submarines were careful to steer clear of, where any submarine detected was fair game. There were also zones (near friendly sub bases) where permission had to be obtained before opening fire. Presumably the commanders ashore would know if there were any friendly subs likely to be in the area and if any nearby shipping was threatened.

If anyone has a copy of Friend or Foe: Friendly Fire at Sea 1939-1945 they can give a more definitive answer than my half-remembered, addled response.

I still can’t find “friend of foe” but I have another book called U-Boat Far From Home.

This illustrates the main use of rules of engagement as a method of preventing friendly fire incidents. Submarines in those days spent a significant proportion of their time on the surface and regularly sent position reports by radio.

Submarines also tend to gather around choke points in straights and off capes and ports. Allied submarines avoided friendly choke points and ports to prevent cases of mistaken identity. And as the previous poster said, when transiting to and from patrol areas in enemy territory or to and from training areas they would be careful to remain in these transit lanes. Any Allied aircraft operating over these lanes wouldn’t be permitted to engage a submarine target with getting clearance from their commanders ashore.