The problem of
processing an egress packet by a data forwarding device having (1) a first routing stack associated with a first
namespace and a first interface, (2) a second routing stack associated with a second
namespace and a second interface, wherein at least some forwarding information included in the second
namespace is incompatible with the first routing stack, (3) a virtual routing and forwarding instance (VRF), and (4) a shared
session layer socket associated with both the first and second routing stack, and bound to the VRF, where the VRF is associated with the second interface via the second routing stack, is solved by: adding the first interface to the VRF whereby the VRF is associated with both the first and second interfaces; and responsive to the adding of the first interface to the VRF, (1) adding routes from the second namespace to the first namespace such that
network address prefixes of the second namespace are associated with a “special” next hop, and (2)
flagging the shared
session layer socket bound to the VRF. When an egress packet on the flagged shared
session layer socket is received, the data forwarding device (1) sends the egress packet to the first routing stack for
processing, (2) looks up next hop information using the first namespace of the first routing stack, and (3) determines whether or not the next hop information is a “special” next hop. Responsive to a determination that the next hop information is a “special” next hop, the data forwarding device injects the egress packet into the second routing stack for
processing.