Protection during secondary infection was conferred by IFNγ- and TNFα-producing γδ T cells. Here, TNF is linked to infection.