There is strong experimental evidence that the superconductor Sr2RuO4 has a chiral p-wave order parameter. This symmetry does not require that the associated gap has nodes, yet specific heat, ultrasound and thermal conductivity measurements indicate the presence of nodes in the superconducting gap structure of Sr2RuO4. Theoretical scenarios have been proposed to account for the existence of accidental nodes or deep accidental minima within a p-wave state. To elucidate the nodal structure of the gap, it is essential to know whether the lines of nodes (or minima) are vertical (parallel to the tetragonal c axis) or horizontal (perpendicular to the c axis). Here, we report thermal conductivity measurements on single crystals of Sr2RuO4 down to 50 mK for currents parallel and perpendicular to the c axis. We find that there is substantial quasiparticle transport in the T = 0 limit for both current directions. A magnetic field H immediately excites quasiparticles with velocities both in the basal plane and in the c direction. Our data down to Tc/30 and down to Hc/100 show no evidence that the nodes are in fact deep minima. Relative to the normal state, the thermal conductivity of the superconducting state is found to be very similar for the two current directions, from H = 0 to H = Hc2. These findings show that the gap structure of Sr2RuO4 consists of vertical line nodes. Given that the c-axis dispersion (warping) of the Fermi surface in Sr2RuO4 varies strongly from surface to surface, the small a-c anisotropy suggests that the line nodes are present on all three sheets of the Fermi surface. If imposed by symmetry, vertical line nodes would be inconsistent with a p-wave order parameter for Sr2RuO4. To reconcile the gap structure revealed by our data with a p-wave state, a mechanism must be found that produces accidental line nodes in Sr2RuO4.