Facebook has just bought some troll repellant in the form of 750 patents for networking, software, and other technologies from IBM according to Bloomberg. If Yahoo relies any of those technologies, Facebook could use the patents to counteract Yahoo’s patent infringement lawsuit against it.

The purchase means Facebook may be in less danger for now, but it doesn’t stop Yahoo from trolling other companies with its vague social networking and advertising patents.

Facebook was in danger of having to either settle with Yahoo or license the old tech giant’s patents to avoid uncertainty heading into its own IPO. It could have tried to invalidate Yahoo’s patents in court, but that case could have spilled over its IPO date and scared away investors.

Since Facebook is a young company, it doesn’t have as robust a patent portfolio as other big successful tech companies. It only had 56 issued and 503 filed patents in the US. With its IPO looming and an expected $100 billion valuation, Facebook was both vulnerable and a lucrative target. Yahoo’s opportunist lawsuit came at the worst possible time.

The IBM patent purchase will boost Facebook’s patent count over 800 in the US. By fighting fire with fire, it may be able to avoid a costly settlement or a plummeting post-IPO stock price. Instead it could come to a cross-licensing agreement with Yahoo or sue the old web portal in response if negotiations break down.

The bundle of patents from IBM could also help Facebook ward off other lawsuits. The company was targeted by 22 patent suits last year, and I’ve heard that Facebook paid to settle some of them. Meanwhile the sale will hardly dent IBM’s patent war chest, which grew by 6,180 last year alone. Patent sales are important business for the hardware company. IBM sold 1,000 to Google back in 2010.

Much of the tech industry railed against Yahoo for going on the offensive, and they’d probably prefer some sort of patent disarmament. Instead we’ve got a patent arms race and mutually assured destruction. Facebook likely shelled out big bucks for its new arsenal. Poorer startups may not have that option, and they could become Yahoo’s next targets.