projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ipv6: icmp: add a force_saddr param to icmp6_send()
[cascardo/linux.git]
/
net
/
ipv6
/
icmp.c
diff --git
a/net/ipv6/icmp.c
b/net/ipv6/icmp.c
index
e32a72f
..
6c57e6e
100644
(file)
--- a/
net/ipv6/icmp.c
+++ b/
net/ipv6/icmp.c
@@
-388,7
+388,8
@@
relookup_failed:
/*
* Send an ICMP message in response to a packet in error
*/
/*
* Send an ICMP message in response to a packet in error
*/
-static void icmp6_send(struct sk_buff *skb, u8 type, u8 code, __u32 info)
+static void icmp6_send(struct sk_buff *skb, u8 type, u8 code, __u32 info,
+ const struct in6_addr *force_saddr)
{
struct net *net = dev_net(skb->dev);
struct inet6_dev *idev = NULL;
{
struct net *net = dev_net(skb->dev);
struct inet6_dev *idev = NULL;
@@
-475,6
+476,8
@@
static void icmp6_send(struct sk_buff *skb, u8 type, u8 code, __u32 info)
memset(&fl6, 0, sizeof(fl6));
fl6.flowi6_proto = IPPROTO_ICMPV6;
fl6.daddr = hdr->saddr;
memset(&fl6, 0, sizeof(fl6));
fl6.flowi6_proto = IPPROTO_ICMPV6;
fl6.daddr = hdr->saddr;
+ if (force_saddr)
+ saddr = force_saddr;
if (saddr)
fl6.saddr = *saddr;
fl6.flowi6_mark = mark;
if (saddr)
fl6.saddr = *saddr;
fl6.flowi6_mark = mark;
@@
-551,7
+554,7
@@
out:
*/
void icmpv6_param_prob(struct sk_buff *skb, u8 code, int pos)
{
*/
void icmpv6_param_prob(struct sk_buff *skb, u8 code, int pos)
{
- icmp6_send(skb, ICMPV6_PARAMPROB, code, pos);
+ icmp6_send(skb, ICMPV6_PARAMPROB, code, pos
, NULL
);
kfree_skb(skb);
}
kfree_skb(skb);
}