diff options
Diffstat (limited to 'net/ipv6/ndisc.c')
-rw-r--r-- | net/ipv6/ndisc.c | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index f1c62ba0f56b..172438320eec 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c | |||
@@ -516,13 +516,13 @@ static void __ndisc_send(struct net_device *dev, | |||
516 | skb->dst = dst; | 516 | skb->dst = dst; |
517 | 517 | ||
518 | idev = in6_dev_get(dst->dev); | 518 | idev = in6_dev_get(dst->dev); |
519 | IP6_INC_STATS(idev, IPSTATS_MIB_OUTREQUESTS); | 519 | IP6_INC_STATS(net, idev, IPSTATS_MIB_OUTREQUESTS); |
520 | 520 | ||
521 | err = NF_HOOK(PF_INET6, NF_INET_LOCAL_OUT, skb, NULL, dst->dev, | 521 | err = NF_HOOK(PF_INET6, NF_INET_LOCAL_OUT, skb, NULL, dst->dev, |
522 | dst_output); | 522 | dst_output); |
523 | if (!err) { | 523 | if (!err) { |
524 | ICMP6MSGOUT_INC_STATS(idev, type); | 524 | ICMP6MSGOUT_INC_STATS(net, idev, type); |
525 | ICMP6_INC_STATS(idev, ICMP6_MIB_OUTMSGS); | 525 | ICMP6_INC_STATS(net, idev, ICMP6_MIB_OUTMSGS); |
526 | } | 526 | } |
527 | 527 | ||
528 | if (likely(idev != NULL)) | 528 | if (likely(idev != NULL)) |
@@ -1199,7 +1199,7 @@ static void ndisc_router_discovery(struct sk_buff *skb) | |||
1199 | } | 1199 | } |
1200 | neigh->flags |= NTF_ROUTER; | 1200 | neigh->flags |= NTF_ROUTER; |
1201 | } else if (rt) { | 1201 | } else if (rt) { |
1202 | rt->rt6i_flags |= (rt->rt6i_flags & ~RTF_PREF_MASK) | RTF_PREF(pref); | 1202 | rt->rt6i_flags = (rt->rt6i_flags & ~RTF_PREF_MASK) | RTF_PREF(pref); |
1203 | } | 1203 | } |
1204 | 1204 | ||
1205 | if (rt) | 1205 | if (rt) |
@@ -1581,12 +1581,12 @@ void ndisc_send_redirect(struct sk_buff *skb, struct neighbour *neigh, | |||
1581 | 1581 | ||
1582 | buff->dst = dst; | 1582 | buff->dst = dst; |
1583 | idev = in6_dev_get(dst->dev); | 1583 | idev = in6_dev_get(dst->dev); |
1584 | IP6_INC_STATS(idev, IPSTATS_MIB_OUTREQUESTS); | 1584 | IP6_INC_STATS(net, idev, IPSTATS_MIB_OUTREQUESTS); |
1585 | err = NF_HOOK(PF_INET6, NF_INET_LOCAL_OUT, buff, NULL, dst->dev, | 1585 | err = NF_HOOK(PF_INET6, NF_INET_LOCAL_OUT, buff, NULL, dst->dev, |
1586 | dst_output); | 1586 | dst_output); |
1587 | if (!err) { | 1587 | if (!err) { |
1588 | ICMP6MSGOUT_INC_STATS(idev, NDISC_REDIRECT); | 1588 | ICMP6MSGOUT_INC_STATS(net, idev, NDISC_REDIRECT); |
1589 | ICMP6_INC_STATS(idev, ICMP6_MIB_OUTMSGS); | 1589 | ICMP6_INC_STATS(net, idev, ICMP6_MIB_OUTMSGS); |
1590 | } | 1590 | } |
1591 | 1591 | ||
1592 | if (likely(idev != NULL)) | 1592 | if (likely(idev != NULL)) |
@@ -1730,9 +1730,8 @@ int ndisc_ifinfo_sysctl_change(struct ctl_table *ctl, int write, struct file * f | |||
1730 | return ret; | 1730 | return ret; |
1731 | } | 1731 | } |
1732 | 1732 | ||
1733 | int ndisc_ifinfo_sysctl_strategy(ctl_table *ctl, int __user *name, | 1733 | int ndisc_ifinfo_sysctl_strategy(ctl_table *ctl, |
1734 | int nlen, void __user *oldval, | 1734 | void __user *oldval, size_t __user *oldlenp, |
1735 | size_t __user *oldlenp, | ||
1736 | void __user *newval, size_t newlen) | 1735 | void __user *newval, size_t newlen) |
1737 | { | 1736 | { |
1738 | struct net_device *dev = ctl->extra1; | 1737 | struct net_device *dev = ctl->extra1; |
@@ -1745,13 +1744,11 @@ int ndisc_ifinfo_sysctl_strategy(ctl_table *ctl, int __user *name, | |||
1745 | 1744 | ||
1746 | switch (ctl->ctl_name) { | 1745 | switch (ctl->ctl_name) { |
1747 | case NET_NEIGH_REACHABLE_TIME: | 1746 | case NET_NEIGH_REACHABLE_TIME: |
1748 | ret = sysctl_jiffies(ctl, name, nlen, | 1747 | ret = sysctl_jiffies(ctl, oldval, oldlenp, newval, newlen); |
1749 | oldval, oldlenp, newval, newlen); | ||
1750 | break; | 1748 | break; |
1751 | case NET_NEIGH_RETRANS_TIME_MS: | 1749 | case NET_NEIGH_RETRANS_TIME_MS: |
1752 | case NET_NEIGH_REACHABLE_TIME_MS: | 1750 | case NET_NEIGH_REACHABLE_TIME_MS: |
1753 | ret = sysctl_ms_jiffies(ctl, name, nlen, | 1751 | ret = sysctl_ms_jiffies(ctl, oldval, oldlenp, newval, newlen); |
1754 | oldval, oldlenp, newval, newlen); | ||
1755 | break; | 1752 | break; |
1756 | default: | 1753 | default: |
1757 | ret = 0; | 1754 | ret = 0; |