I think it's pretty obvious you have to replace this pipe. As far as a vent is concerned, I know many of the pros will moan and groan over this, but here is a place where an AV vent would work. You would just put a tee in the trap arm and a short nipple with an adapter above the tee. The AV would screw into the adapter.
That joint would probably have NEVER leaked, but since you have it exposed all it needs is a hammer and calking iron, or blunt chisel/screwdriver, to hammer it tight to the pipe.