Project

General

Profile

Actions

Bug #883

closed

correct packet dispatching in divert(4)

Added by sepherosa almost 17 years ago. Updated almost 17 years ago.

Status:
Closed
Priority:
Low
Assignee:
-
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

Hi,

Following patch corrects the packet dispatching in div_output():
http://leaf.dragonflybsd.org/~sephe/ip_divert.diff

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
accordingly
- 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,
sephe

Actions

Also available in: Atom PDF