Commit 4ebdfba7 authored by Eric W. Biederman's avatar Eric W. Biederman Committed by David S. Miller
Browse files

dst: Pass a sk into .local_out



For consistency with the other similar methods in the kernel pass a
struct sock into the dst_ops .local_out method.

Simplifying the socket passing case is needed a prequel to passing a
struct net reference into .local_out.

Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 13206b6b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -74,9 +74,9 @@ static struct dst_entry *vrf_ip_check(struct dst_entry *dst, u32 cookie)
	return dst;
}

static int vrf_ip_local_out(struct sk_buff *skb)
static int vrf_ip_local_out(struct sock *sk, struct sk_buff *skb)
{
	return ip_local_out(skb);
	return ip_local_out_sk(sk, skb);
}

static unsigned int vrf_v4_mtu(const struct dst_entry *dst)
+1 −1
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@ struct dst_ops {
					       struct sk_buff *skb, u32 mtu);
	void			(*redirect)(struct dst_entry *dst, struct sock *sk,
					    struct sk_buff *skb);
	int			(*local_out)(struct sk_buff *skb);
	int			(*local_out)(struct sock *sk, struct sk_buff *skb);
	struct neighbour *	(*neigh_lookup)(const struct dst_entry *dst,
						struct sk_buff *skb,
						const void *daddr);
+1 −0
Original line number Diff line number Diff line
@@ -112,6 +112,7 @@ int ip_mc_output(struct sock *sk, struct sk_buff *skb);
int ip_do_fragment(struct net *net, struct sock *sk, struct sk_buff *skb,
		   int (*output)(struct net *, struct sock *, struct sk_buff *));
void ip_send_check(struct iphdr *ip);
int __ip_local_out_sk(struct sock *sk, struct sk_buff *skb);
int __ip_local_out(struct sk_buff *skb);
int ip_local_out_sk(struct sock *sk, struct sk_buff *skb);
static inline int ip_local_out(struct sk_buff *skb)
+1 −0
Original line number Diff line number Diff line
@@ -865,6 +865,7 @@ int ip6_forward(struct sk_buff *skb);
int ip6_input(struct sk_buff *skb);
int ip6_mc_input(struct sk_buff *skb);

int __ip6_local_out_sk(struct sock *sk, struct sk_buff *skb);
int __ip6_local_out(struct sk_buff *skb);
int ip6_local_out_sk(struct sock *sk, struct sk_buff *skb);
int ip6_local_out(struct sk_buff *skb);
+1 −1
Original line number Diff line number Diff line
@@ -96,7 +96,7 @@ void ip_send_check(struct iphdr *iph)
}
EXPORT_SYMBOL(ip_send_check);

static int __ip_local_out_sk(struct sock *sk, struct sk_buff *skb)
int __ip_local_out_sk(struct sock *sk, struct sk_buff *skb)
{
	struct net *net = dev_net(skb_dst(skb)->dev);
	struct iphdr *iph = ip_hdr(skb);
Loading