Generalize from NAT-PMP to both NAT-PMP and UPnP.