Contributors: 13
| Author |
Tokens |
Token Proportion |
Commits |
Commit Proportion |
| Steffen Klassert |
50 |
23.15% |
4 |
12.12% |
| Patrick McHardy |
46 |
21.30% |
3 |
9.09% |
| Hannes Frederic Sowa |
24 |
11.11% |
1 |
3.03% |
| Herbert Xu |
22 |
10.19% |
3 |
9.09% |
| Eric W. Biedermann |
15 |
6.94% |
5 |
15.15% |
| James Morris |
14 |
6.48% |
2 |
6.06% |
| Linus Torvalds (pre-git) |
14 |
6.48% |
6 |
18.18% |
| David S. Miller |
11 |
5.09% |
1 |
3.03% |
| Eric Dumazet |
9 |
4.17% |
3 |
9.09% |
| Florian Westphal |
5 |
2.31% |
2 |
6.06% |
| Phil Sutter |
3 |
1.39% |
1 |
3.03% |
| Thomas Gleixner |
2 |
0.93% |
1 |
3.03% |
| Jan Engelhardt |
1 |
0.46% |
1 |
3.03% |
| Total |
216 |
|
33 |
|
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* xfrm4_output.c - Common IPsec encapsulation code for IPv4.
* Copyright (c) 2004 Herbert Xu <herbert@gondor.apana.org.au>
*/
#include <linux/if_ether.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/skbuff.h>
#include <linux/netfilter_ipv4.h>
#include <net/dst.h>
#include <net/ip.h>
#include <net/xfrm.h>
#include <net/icmp.h>
static int __xfrm4_output(struct net *net, struct sock *sk, struct sk_buff *skb)
{
#ifdef CONFIG_NETFILTER
struct xfrm_state *x = skb_dst(skb)->xfrm;
if (!x) {
IPCB(skb)->flags |= IPSKB_REROUTED;
return dst_output(net, sk, skb);
}
#endif
return xfrm_output(sk, skb);
}
int xfrm4_output(struct net *net, struct sock *sk, struct sk_buff *skb)
{
return NF_HOOK_COND(NFPROTO_IPV4, NF_INET_POST_ROUTING,
net, sk, skb, skb->dev, skb_dst_dev(skb),
__xfrm4_output,
!(IPCB(skb)->flags & IPSKB_REROUTED));
}
void xfrm4_local_error(struct sk_buff *skb, u32 mtu)
{
struct iphdr *hdr;
hdr = skb->encapsulation ? inner_ip_hdr(skb) : ip_hdr(skb);
ip_local_error(skb->sk, EMSGSIZE, hdr->daddr,
inet_sk(skb->sk)->inet_dport, mtu);
}