net: reduce structures when XFRM=n
ifdef out * struct sk_buff::sp (pointer) * struct dst_entry::xfrm (pointer) * struct sock::sk_policy (2 pointers) Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
b057efd4d2
commit
def8b4faff
@@ -976,9 +976,10 @@ int icmp_rcv(struct sk_buff *skb)
|
||||
struct net *net = dev_net(rt->u.dst.dev);
|
||||
|
||||
if (!xfrm4_policy_check(NULL, XFRM_POLICY_IN, skb)) {
|
||||
struct sec_path *sp = skb_sec_path(skb);
|
||||
int nh;
|
||||
|
||||
if (!(skb->sp && skb->sp->xvec[skb->sp->len - 1]->props.flags &
|
||||
if (!(sp && sp->xvec[sp->len - 1]->props.flags &
|
||||
XFRM_STATE_ICMP))
|
||||
goto drop;
|
||||
|
||||
|
Reference in New Issue
Block a user