The legal team at Yahoo reached out to Facebook yesterday, at the same time as they were briefing the New York Times, to give the social networking giant the heads up that it would be seeking licensing fees on ten to twenty patents, and suing if that didn’t work.

“Yahoo has a responsibility to its shareholders, employees and other stakeholders to protect its intellectual property,” a Yahoo spokesman said in an e-mailed statement to the NYT. “We must insist that Facebook either enter into a licensing agreement or we will be compelled to move forward unilaterally to protect our rights.”

One has to wonder if Yahoo sees Facebook as particularly vulnerable right now, in the months before their big IPO. Uncertainty over litigation could hurt the stock, meaning Facebook would feel pinched to settle in a short time, rather than drag things into the courts.

Reactions from the tech world were not pretty. “Yahoo is now a patent troll, how profoundly disappointing,” wrote venture capital investor Brad Feld.

Yahoo recently brought on board a new CEO, Scott Thompson, a former CTO who said he would bring the company back to a focus on technology. The Financial Times reports that this was the real impetus behind the move. “One person familiar with Yahoo’s deliberations denied that the approach to Facebook was prompted by its imminent IPO. Rather, it reflected the hunt by new Yahoo chief executive Scott Thompson to boost the performance of all aspects of the company’s business, the person said.”

As DealBook mentions, this isn’t the first time Yahoo has done a patent shakedown just before and IPO. It settled with Google a mere ten days before their IPO, collecting a healthy chunk of pre-IPO stock for its troubles.