Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 90036
b: refs/heads/master
c: 9a43b70
h: refs/heads/master
v: v3
  • Loading branch information
Benjamin Thery authored and David S. Miller committed Mar 5, 2008
1 parent b8a5de4 commit 12e436b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: da6bb5c0c5c22e8289aa555afadfb69487fafbc3
refs/heads/master: 9a43b709a230705ca40a6f854a334a02334a3c1c
13 changes: 8 additions & 5 deletions trunk/net/ipv6/icmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ static inline int icmpv6_xrlim_allow(struct sock *sk, int type,
struct flowi *fl)
{
struct dst_entry *dst;
struct net *net = sk->sk_net;
int res = 0;

/* Informational messages are not limited. */
Expand All @@ -178,15 +179,15 @@ static inline int icmpv6_xrlim_allow(struct sock *sk, int type,
* XXX: perhaps the expire for routing entries cloned by
* this lookup should be more aggressive (not longer than timeout).
*/
dst = ip6_route_output(&init_net, sk, fl);
dst = ip6_route_output(net, sk, fl);
if (dst->error) {
IP6_INC_STATS(ip6_dst_idev(dst),
IPSTATS_MIB_OUTNOROUTES);
} else if (dst->dev && (dst->dev->flags&IFF_LOOPBACK)) {
res = 1;
} else {
struct rt6_info *rt = (struct rt6_info *)dst;
int tmo = init_net.ipv6.sysctl.icmpv6_time;
int tmo = net->ipv6.sysctl.icmpv6_time;

/* Give more bandwidth to wider prefixes. */
if (rt->rt6i_dst.plen < 128)
Expand Down Expand Up @@ -305,6 +306,7 @@ static inline void mip6_addr_swap(struct sk_buff *skb) {}
void icmpv6_send(struct sk_buff *skb, int type, int code, __u32 info,
struct net_device *dev)
{
struct net *net = skb->dev->nd_net;
struct inet6_dev *idev = NULL;
struct ipv6hdr *hdr = ipv6_hdr(skb);
struct sock *sk;
Expand Down Expand Up @@ -334,7 +336,7 @@ void icmpv6_send(struct sk_buff *skb, int type, int code, __u32 info,
*/
addr_type = ipv6_addr_type(&hdr->daddr);

if (ipv6_chk_addr(&init_net, &hdr->daddr, skb->dev, 0))
if (ipv6_chk_addr(net, &hdr->daddr, skb->dev, 0))
saddr = &hdr->daddr;

/*
Expand Down Expand Up @@ -391,7 +393,7 @@ void icmpv6_send(struct sk_buff *skb, int type, int code, __u32 info,
fl.fl_icmp_code = code;
security_skb_classify_flow(skb, &fl);

sk = icmpv6_sk(&init_net);
sk = icmpv6_sk(net);
np = inet6_sk(sk);

if (icmpv6_xmit_lock(sk))
Expand Down Expand Up @@ -507,6 +509,7 @@ EXPORT_SYMBOL(icmpv6_send);

static void icmpv6_echo_reply(struct sk_buff *skb)
{
struct net *net = skb->dev->nd_net;
struct sock *sk;
struct inet6_dev *idev;
struct ipv6_pinfo *np;
Expand Down Expand Up @@ -537,7 +540,7 @@ static void icmpv6_echo_reply(struct sk_buff *skb)
fl.fl_icmp_type = ICMPV6_ECHO_REPLY;
security_skb_classify_flow(skb, &fl);

sk = icmpv6_sk(&init_net);
sk = icmpv6_sk(net);
np = inet6_sk(sk);

if (icmpv6_xmit_lock(sk))
Expand Down

0 comments on commit 12e436b

Please sign in to comment.