xfrm: use gre key as flow upper protocol info
The GRE Key field is intended to be used for identifying an individual traffic flow within a tunnel. It is useful to be able to have XFRM policy selector matches to have different policies for different GRE tunnels. Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
e1f2d8c2cc
commit
cc9ff19da9
@@ -779,9 +779,9 @@ static netdev_tx_t ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev
|
||||
.tos = RT_TOS(tos)
|
||||
}
|
||||
},
|
||||
.proto = IPPROTO_GRE
|
||||
}
|
||||
;
|
||||
.proto = IPPROTO_GRE,
|
||||
.fl_gre_key = tunnel->parms.o_key
|
||||
};
|
||||
if (ip_route_output_key(dev_net(dev), &rt, &fl)) {
|
||||
dev->stats.tx_carrier_errors++;
|
||||
goto tx_error;
|
||||
@@ -958,7 +958,8 @@ static int ipgre_tunnel_bind_dev(struct net_device *dev)
|
||||
.tos = RT_TOS(iph->tos)
|
||||
}
|
||||
},
|
||||
.proto = IPPROTO_GRE
|
||||
.proto = IPPROTO_GRE,
|
||||
.fl_gre_key = tunnel->parms.o_key
|
||||
};
|
||||
struct rtable *rt;
|
||||
|
||||
@@ -1223,7 +1224,8 @@ static int ipgre_open(struct net_device *dev)
|
||||
.tos = RT_TOS(t->parms.iph.tos)
|
||||
}
|
||||
},
|
||||
.proto = IPPROTO_GRE
|
||||
.proto = IPPROTO_GRE,
|
||||
.fl_gre_key = t->parms.o_key
|
||||
};
|
||||
struct rtable *rt;
|
||||
|
||||
|
Reference in New Issue
Block a user