Bug #883

correct packet dispatching in divert(4)

Added by sepherosa almost 9 years ago. Updated over 8 years ago.

Status:ClosedStart date:
Priority:LowDue date:
Assignee:-% Done:


Target version:-



Following patch corrects the packet dispatching in div_output():

Changes in the above patch:
- Add mbuf** parameter to protosw.pr_mport
- Pass 'addr' to pr_mport() in so_pru_send(); udp_soport() is adjusted
- Change ip_mport(), so it will do the same thing as udp_soport() if
called on an outgoing UDP packet
- Add div_soport():
o Delegate non-PRU_SEND operation to cpu0_soport()
o Move receiving interface setting up code from div_output() into
this function, so ip_mport() could be called
o Use ip_mport() to find the target lwkt port
With the above changes, I would not need to do two back-to-back msg
dispatching (one in so_pru_send() to netisr on CPU0, another in
div_output() to the real target lwkt port); a packet is sent to the
target lwkt port directly.

Please review it.

Best Regards,

Also available in: Atom PDF