Only mangle outgoing traffic if from me and idout.src = 0
@@ -103,7 +103,7 @@ void csp_send_direct(csp_id_t idout, csp_packet_t * packet, csp_iface_t * routed
}
/* Apply outgoing interface address to packet */
- if (from_me) {
+ if ((from_me) && (idout.src == 0)) {
idout.src = iface->addr;
}
@@ -135,7 +135,7 @@ void csp_send_direct(csp_id_t idout, csp_packet_t * packet, csp_iface_t * routed
}
/* Apply outgoing interface address to packet */
- if (from_me) {
+ if ((from_me) && (idout.src == 0)) {
idout.src = route->iface->addr;
}
@@ -155,7 +155,7 @@ void csp_send_direct(csp_id_t idout, csp_packet_t * packet, csp_iface_t * routed
}
/* Apply outgoing interface address to packet */
- if (from_me) {
+ if ((from_me) && (idout.src == 0)) {
idout.src = dfl_if->addr;
}
