History

ipvlan: Introduce l3s mode

In a typical IPvlan L3 setup where master is in default-ns and each slave is into different (slave) ns. In this setup egress packet processing for traffic originating from slave-ns will hit all NF_HOOKs in slave-ns as well as default-ns. However same is not true for ingress processing. All these NF_HOOKs are hit only in the slave-ns skipping them in the default-ns. IPvlan in L3 mode is restrictive and if admins want to deploy iptables rules in default-ns, this asymmetric data path makes it impossible to do so. This patch makes use of the l3_rcv() (added as part of l3mdev enhancements) to perform input route lookup on RX packets without changing the skb->dev and then uses nf_hook at NF_INET_LOCAL_IN to change the skb->dev just before handing over skb to L4.

Mahesh Bandewar committed 10 years ago

Commit 4fbae7d1 parent e8bffe06 files · +188 −8Browse files

Showing the changes to include/uapi/linux (1 of 6 files). Show all

Unified · Split

include/uapi/linux/if_link.h+1−0
@@ -464,6 +464,7 @@ enum { · 463 unmodified lines
464enum ipvlan_mode {464enum ipvlan_mode {
465 IPVLAN_MODE_L2 = 0,465 IPVLAN_MODE_L2 = 0,
466 IPVLAN_MODE_L3,466 IPVLAN_MODE_L3,
467 IPVLAN_MODE_L3S,
467 IPVLAN_MODE_MAX468 IPVLAN_MODE_MAX
468};469};
469 470

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t